Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fdaciuk/iscpf
Validate CPF numbers (for NodeJS and browsers)
https://github.com/fdaciuk/iscpf
Last synced: 17 days ago
JSON representation
Validate CPF numbers (for NodeJS and browsers)
- Host: GitHub
- URL: https://github.com/fdaciuk/iscpf
- Owner: fdaciuk
- License: mit
- Created: 2016-03-29T21:47:40.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-05-10T19:01:26.000Z (over 3 years ago)
- Last Synced: 2024-10-13T13:30:08.422Z (about 1 month ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/iscpf
- Size: 121 KB
- Stars: 36
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iscpf
> Validate CPF numbers (for Node.js and browsers)
[![Build Status][build-image]][build-url]
[![License][license-image]][license-url]## Installation
**NPM:**
```console
npm install --save iscpf
```**Yarn:**
```console
yarn add iscpf
```## Usage
Import the lib:
**ES6 Modules:**
```js
import { isCpf } from 'iscpf'
```**CommonJS:**
```js
const { isCpf } = require('iscpf')
```Don't worry about pontuation:
```js
console.log(isCpf('75300153206')) // true
console.log(isCpf('462.498.462-55')) // true
```Enjoy ;)
## License
[MIT][license-url] © Fernando Daciuk
[build-image]: https://img.shields.io/travis/fdaciuk/iscpf.svg?style=flat-square
[build-url]: https://github.com/fdaciuk/iscpf/actions/workflows/npm-publish.yml
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square
[license-url]: https://github.com/fdaciuk/licenses/blob/master/MIT-LICENSE.md