Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iguntur/phone-number-generator
Generate random phone number
https://github.com/iguntur/phone-number-generator
Last synced: about 11 hours ago
JSON representation
Generate random phone number
- Host: GitHub
- URL: https://github.com/iguntur/phone-number-generator
- Owner: iguntur
- License: mit
- Created: 2019-04-04T13:14:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-04T14:14:08.000Z (over 5 years ago)
- Last Synced: 2024-10-05T11:17:42.105Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# phone-number-generator
[![Build Status](https://travis-ci.com/iguntur/phone-number-generator.svg?token=Gqg6SWkLJ3YyFSAu5i3M&branch=master)](https://travis-ci.com/iguntur/phone-number-generator)
[![npm](https://img.shields.io/npm/v/@guntur/phone-number-generator.svg?style=flat)](https://www.npmjs.org/package/@guntur/phone-number-generator)
[![node](https://img.shields.io/node/v/@guntur/phone-number-generator.svg?style=flat)](https://nodejs.org)> Generate random phone number
## Install
```console
$ npm install @guntur/phone-number-generator
```## Usage
```js
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: ``
- Returns: `` - An array of string.#### options
- provider - Phone number provider.
- Types: ``
- Default: `0000`- hlr - Phone number HLR.
- Types: ``
- Default: `0000`- start - Phone number to start from.
- Types: ``
- Default: `0000`- end - Phone number to end from.
- Types: ``
- Default: `9999`- delimiter - Phone number delimiter.
- Types: ``
- Default: `''`## License
MIT © [Guntur Poetra](https://github.com/iguntur)