5.3.0 • Published 5 years ago
bd-cellnum-validator v5.3.0
bd-cellnum-validator
Validates Bangladeshi cell phone numbers.
How to?
Installation
- Install from
npm:
npm install bd-cellnum-validatorUsage 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 testisValid function
isValidfunction takes the cell number asStringas its param.- returns
trueif the cell number is valid andfalseotherwise.
License
MIT
