Giter VIP home page Giter VIP logo

mhnahib / bd-phone-number-validator Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 4 KB

bd-phone-number-validator is a npm package designed to validate phone number of bangladesh. It can validates any Bangladeshi cell phone numbers and show all the information about the phone numbers operator.

Home Page: https://www.npmjs.com/package/bd-phone-number-validator

JavaScript 100.00%
npm phone-number-verification phone phone-number-validation bangladesh bd-phone-validation bangladeshi-phone-number

bd-phone-number-validator's Introduction

npm i bd-phone-number-validator

npm npm

bd-phone-number-validator is a npm package designed to validate phone number of bangladesh. It can validates any Bangladeshi cell phone numbers and show all the information about the phone numbers operator.

Features

  • Can validae any Bangladeshi phone number (like +8801/8801/01).
  • Can find operator of the phone number.
  • Can return all the information of the phone number as object.

Components/ Objects

  • validate:

    • Takes phone number as input
    • Returns a boolean
      • true - if the number is valid
      • false - if not valid
  • operator:

    • Takes phone number as input
    • Returns an object
    • object contains:
    {
        phoneNumber: given phone number for validation',
        isValid: boolean,
        operator: operator name,
        operator_status: operator status
    }

How to install?

  npm i bd-phone-number-validator

Usage/Examples

const { validate, operator } = require("bd-phone-number-validator");

/* 
// operator returns an object 
// object contains: 
{
  phoneNumber: given phone number for validation',
  isValid: boolean,
  operator: operator name,
  operator_status: operator status
}
*/
console.log(operator(`01700000000`));

// validate returns a boolean
// true - if the number is valid
// false - if not valid
console.log(validate(`01000000000`));

Output

bd-phone-number-validator

๐Ÿš€ Authors

@MHNahib

portfolio portfolio linkedin twitter

License

MIT

bd-phone-number-validator's People

Contributors

mhnahib avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.