@guntur/phone-number-generator

0.1.1 • Public • Published

phone-number-generator

Build Status npm node

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

phoneNumberGenerator(options: object)

  • Params:
    • options: <object>
  • Returns: <string[]> - An array of string.

options

  • provider - Phone number provider.

    • Types: <string>
    • Default: 0000
  • hlr - Phone number HLR.

    • Types: <string>
    • Default: 0000
  • start - Phone number to start from.

    • Types: <string>
    • Default: 0000
  • end - Phone number to end from.

    • Types: <string>
    • Default: 9999
  • delimiter - Phone number delimiter.

    • Types: <string>
    • Default: ''

License

MIT © Guntur Poetra

Readme

Keywords

none

Package Sidebar

Install

npm i @guntur/phone-number-generator

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

3.62 kB

Total Files

4

Last publish

Collaborators

  • guntur