phone-id.js

0.1.5 • Public • Published

phone-id.js

Build Status

A library to generate Indonesian phone numbers. Numbers may or may not be valid.

Generating Phone Numbers

const phoneid = require('phone-id.js')

// Any operator
number = phoneid.anything(8, false)

// Axis
number = phoneid.axis(8, false)

// Byru
number = phoneid.byru(8, false)

// Indosat
number = phoneid.indosat(8, false)

// Lippo
number = phoneid.lippo(8, false)

// Sampoerna
number = phoneid.sampoerna(8, false)

// Smartfren
number = phoneid.smartfren(8, false)

// Telkomsel
number = phoneid.telkomsel(8, false)

// Three
number = phoneid.three(8, false)

// XL
number = phoneid.xl(8, false)

length - The length after the international prefix and operator code

international_prefix - If set to true will prefix with +62 else it will prefix with 0.

Installing

$ npm install phone-id.js

Testing

$ npm test

License

Please see LICENSE.txt.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.5
    1
    • latest

Version History

Package Sidebar

Install

npm i phone-id.js

Weekly Downloads

5

Version

0.1.5

License

MIT

Last publish

Collaborators

  • tista