network-operators
v0.0.2
Published
Networks Operators in Cambodia
Downloads
4
Maintainers
Readme
Network Operators
A package for querying network operators in Cambodia.
Install
npm
npm install network-operators
pnpm
pnpm add network-operators
yarn
yarn add network-operators
Usage
// ESM
import {
prefixInfo,
phoneNumberInfo,
networkOperators,
parsePhoneNumber
} from 'network-operators'
// CJS
const {
prefixInfo,
phoneNumberInfo,
networkOperators,
parsePhoneNumber
} = require('network-operators')
console.log(prefixInfo('012'))
// { operator: 'Cellcard', length: [ 6, 7 ] }
console.log(phoneNumberInfo('012123123'))
// {
// operator: 'Cellcard',
// length: [ 6, 7 ],
// prefix: '012',
// suffix: '123123',
// number: '012123123'
// }
console.log(networkOperators())
// [
// 'Cellcard', 'CooTel',
// 'Kingtel', 'Seatel',
// 'Metfone', 'qb',
// 'Smart'
// ]
console.log(parsePhoneNumber('010123123'))
// { prefix: '010', suffix: '123123', number: '010123123' }
Free Public API runs on deno.dev
https://network.deno.dev/010
https://network.deno.dev/096
https://network.deno.dev/086
https://network.deno.dev/012888999
License
Apache-2.0