1.0.10 • Published 11 months ago

validator-ponsel v1.0.10

Weekly downloads
9
License
MIT
Repository
github
Last release
11 months ago

Validator Ponsel

A small tool to lookup a string and identify it as a valid Indonesian mobile operator.

Available Mobile Operators

Install

npm install validator-ponsel

Usage

const ponsel = require('validator-ponsel');

const nomorAxis = ponsel('0838 1234 5678');
console.log(nomorAxis); // will result axis

const nomorIndosat = ponsel('0816 1232 5678');
console.log(nomorIndosat); // will result indosat

const nomorSmartfren = ponsel('0888 1234 5678');
console.log(nomorSmartfren); // will result smartfren

const nomorTelkomsel = ponsel('0812 1234 5678');
console.log(nomorTelkomsel); // will result telkomsel

const nomorThree = ponsel('0899 1234 5678');
console.log(nomorThree); // will result three

const nomorXl = ponsel('0817 1234 5678');
console.log(nomorXl); // will result xl

Moving Forward

  • I'm very opened for feedback on detection pattern, specially the number of digits
  • Also will be interesting if this library can be extended to detect mobile operators from other countries based on the string's format. Contributors wanted!

License

MIT

1.0.10

11 months ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

3 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago