Skip to content

shams-nahid/validate-phone-number-node-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phone number check

Introduction

Phone number check is a npm module for NodeJS, that checks if a phone number exists and valid.

It validates the number through regex.

Install

npm i validate-phone-number-node-js

Usage

validate(phoneNumber)

The function signature accepts an arguments and returns a boolean value.

  • true (boolean) valid phone number.
  • false (boolean) invalid phone number.

Example

const validatePhoneNumber = require('validate-phone-number-node-js');
const result = validatePhoneNumber.validate('+8801744253089');

Test

npm run test

MIT License