phone-number-generator
Generate random phone number
Install
$ npm install @guntur/phone-number-generator
Usage
const phoneNumberGenerator = require('phone-number-generator');
const results = phoneNumberGenerator({
provider: '+62800',
hlr: '1234',
start: '0000',
end: '0100',
delimiter: '-'
});
console.log(results);
/*
[
'+62800-1234-0000',
'+62800-1234-0001',
...
'+62800-1234-0099',
'+62800-1234-0100'
]
*/
API
options: object
)
phoneNumberGenerator(- Params:
- options:
<object>
- options:
- Returns:
<string[]>
- An array of string.
options
-
provider - Phone number provider.
- Types:
<string>
- Default:
0000
- Types:
-
hlr - Phone number HLR.
- Types:
<string>
- Default:
0000
- Types:
-
start - Phone number to start from.
- Types:
<string>
- Default:
0000
- Types:
-
end - Phone number to end from.
- Types:
<string>
- Default:
9999
- Types:
-
delimiter - Phone number delimiter.
- Types:
<string>
- Default:
''
- Types:
License
MIT © Guntur Poetra