Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

@brazilian-utils/is-valid-phone

0.1.1 • Public • Published

@brazilian-utils/is-valid-phone

Check if Phone is valid

Installation

# Yarn 
yarn add @brazilian-utils/is-valid-phone
 
# npm 
npm install @brazilian-utils/is-valid-phone --save
 
# UMD 
<script type='text/javascript' src='https://unpkg.com/@brazilian-utils/is-valid-phone/dist/index.umd.js'></script>

Usage

import isValidPhone from '@brazilian-utils/is-valid-phone';
 
isValidPhone('(11) 9 0000-0000'); // true
isValidPhone('11900000000'); // true
isValidPhone('1130000000'); // true
isValidPhone('(11) 9000-0000'); // false
isValidPhone('(11) 3 0000-0000'); // false
isValidPhone('(11) 3 0000-0000'); // false

install

npm i @brazilian-utils/is-valid-phone

Downloadsweekly downloads

1,872

version

0.1.1

license

MIT

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability