1.0.4 • Published 3 years ago
random-phone-numbers v1.0.4
Random phone numbers
Random phone numbers is a generator for phone numbers. You can pass a iso number for a country and the returned phone number returned will be specfic for the country.
The library contains Typescript definitions.
Examples
import { randomPhoneNumbers } from 'random-phone-numbers';
const randomPhoneNumber = randomPhoneNumbers.generate('GB');
console.log(randomPhoneNumber);
// +4472852385365
If you dont pass a country iso, generate will return a random US number
import { randomPhoneNumbers } from 'random-phone-numbers';
const randomPhoneNumber = randomPhoneNumbers.generate();
console.log(randomPhoneNumber);
// +15551435965
Todo
- Support iso3 country codes
- Add optional formatted support
- Improve the testing suite