sa-number-regex

1.0.0 • Public • Published

sa-number-regex

package version package downloads standard-readme compliant package license make a pull request

Regular expression for matching South African Cellphone numbers

Table of Contents

Install

This project uses node and npm.

$ npm install sa-number-regex
# OR 
$ yarn add sa-number-regex

Usage

const saNumberRegex = require('sa-number-regex')
 
console.log(saNumberRegex({exact: true}).test('0749585337')) // true
console.log(saNumberRegex({exact: true}).test('0833597957')) // true
console.log(saNumberRegex({exact: true}).test('0845017368')) // true
 

The exact argument only match an exact string. Default is global.

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature' 3.Push to the branch: git push origin my-new-feature
  3. Submit a pull request

License

MIT

Package Sidebar

Install

npm i sa-number-regex

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

136 kB

Total Files

7

Last publish

Collaborators

  • tiaanduplessis