GitHunt
RA

rashomon-gh/bd-cellnum-validator

Validates Bangladeshi cell phone numbers

bd-cellnum-validator

Validates Bangladeshi cell phone numbers.

NPM

Build Status
Build Status
npm version DeepScan grade CodeFactor

How to?

Installation

  • Install from npm :
npm install bd-cellnum-validator

Usage Example

const validator = require('bd-cellnum-validator');

var cellNumber = '1212121'

// validator.isValid returns a boolean
// true - if the number is valid
// false - if not valid
var result = validator.isValid(cellNumber);

console.log(result);

Testing

  • Clone the repository from github
  • Then open your favorite command shell inside the directory and run :
npm run test

isValid function

  • isValid function takes the cell number as String as its param.
  • returns true if the cell number is valid and false otherwise.

License

MIT

Languages

JavaScript100.0%

Contributors

MIT License
Created July 17, 2018
Updated January 10, 2024