You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
909 B
909 B
phone
// usage
chance.phone()
chance.phone({ formatted: false })
chance.phone({ country: "fr" })
chance.phone({ country: "fr", mobile: true })
Generate a random phone
chance.phone();
=> '(494) 927-2152'
By default conforms to NANP for a proper US phone number.
Optionally disable formatting.
chance.phone({ formatted: false });
=> '2617613391'
Optionally specify a country.
chance.phone({ country: 'fr' });
=> '01 60 44 92 67'
Note, at current we only have support for 'us', 'uk', or 'fr' for countries.
For uk and fr, optionally specify a mobile phone.
chance.phone({ country: 'uk', mobile: true });
=> '07624 321221'
For us, optionally specify an exampleNumber for a '555' area code.
chance.phone({ country: 'us', exampleNumber: true });
=> '(555) 927-2152'