Skip to content

Commit

Permalink
Added the documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstebo committed Oct 16, 2017
1 parent d288c52 commit 2998518
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Contents
- [Faker.Music](doc/music.md)
- [Faker.Name](doc/name.md)
- [Faker.Number](doc/number.md)
- [Faker.PhoneNumber](doc/phone_number.md)
- [Faker.Placeholdit](doc/placeholdit.md)
- [Faker.Pokemon](doc/pokemon.md)
- [Faker.RickAndMorty](doc/rick_and_morty.md)
Expand Down
34 changes: 34 additions & 0 deletions doc/phone_number.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Faker.PhoneNumber

Phone numbers may be in any of the following formats:

* 333-333-3333
* (333) 333-3333
* 1-333-333-3333
* 333.333.3333
* 333-333-3333
* 333-333-3333 x3333
* (333) 333-3333 x3333
* 1-333-333-3333 x3333
* 333.333.3333 x3333

(Don't let the example output below fool you - any format can be returned at random.)

```js
Faker.PhoneNumber.phoneNumber() //=> "397.693.1309"

Faker.PhoneNumber.cellPhone() //=> "(186)285-7925"

// US only
Faker.PhoneNumber.areaCode() //=> "201"

// US only
Faker.PhoneNumber.exchangeCode() //=> "208"

// Optional parameter: length=4
Faker.PhoneNumber.subscriberNumber() //=> "3873"

Faker.PhoneNumber.subscriberNumber(2) //=> "39"

Faker.PhoneNumber.extension() //=> "3764"
```

0 comments on commit 2998518

Please sign in to comment.