Skip to content

Commit 536e8f4

Browse files
author
avallete
committed
chore: update README.md phoneNumber method
1 parent ec94eca commit 536e8f4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,19 @@ Takes in an [input](#input) and returns a string value resembling a [phone numbe
352352
copycat.phoneNumber('foo')
353353
// => '+208438699696662'
354354
```
355+
```js
356+
copycat.phoneNumber('foo', { prefixes: ['+3319900', '+3363998'], min: 1000, max: 9999 })
357+
// => '+33639983457'
358+
```
355359

356360
**note** The strings _resemble_ phone numbers, but will not always be valid. For example, the country dialing code may not exist, or for a particular country, the number of digits may be incorrect. Please let us know if you need valid
357361
phone numbers, and feel free to contribute :)
358362

363+
#### `options`
364+
- **`min=10000000000`:** Constrain generated values to be greater than or equal to `min` allow to control the minimum number of digits in the phone number
365+
- **`max=999999999999999`:** Constrain generated values to be less than or equal to `max` allow to control the maximum number of digits in the phone number
366+
- **`prefixes`:** An array of strings that should be used as prefixes for the generated phone numbers. Allowing to control the country dialing code.
367+
359368
### `copycat.username(input)`
360369

361370
Takes in an [input](#input) and returns a string value resembling a username.

0 commit comments

Comments
 (0)