mm-mobile-tool
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

MM Mobile Tools - Javascript

A npm package for working with Myanmar phone numbers

npm version Build status codecov npm downloads

Table of Contents

Features

  • Check if a phone number is a valid Myanmar phone number
  • Get the operator from a phone number

Installing

Package manager

Using npm:

$ npm install mm-mobile-tool 

Once the package is installed, you can import the library using import:

import mmphone from 'mm-mobile-tool';

Examples

Check if phone number is valid

import mmphone from 'mm-mobile-tool';

if(mmphone.isValid("09440813577")){
    console.log("Phone number is valid");
}

Get operator

import mmphone,{ Operator } from 'mm-mobile-tool';

if(mmphone.getOperator("09440813577")===Operator.MPT){
    console.log("Phone number is MPT"); 
}

Operator types

  • MPT = Operator.MPT
  • Ooredoo = Operator.OOREDOO
  • ATOM = Operator.ATOM
  • MECTel = Operator.MECTEL
  • MyTel = Operator.MYTEL

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i mm-mobile-tool

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

11.6 kB

Total Files

18

Last publish

Collaborators

  • lwinmoehein