@lacussoft/cpf-val
v1.1.1
Published
Basic function to validate CPF (Brazilian ID document).
Downloads
34
Maintainers
Readme
LacusSoft :: cpf-val
Basic function to validate CPF (Brazilian ID document).
Browser Support
| | | | | | --- | --- | --- | --- | --- | --- | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Installation
$ npm install @lacussoft/cpf-val
Import
// ES Modules
import cpfVal from '@lacussoft/cpf-val'
// Common JS
const cpfVal = require('@lacussoft/cpf-val')
or import it through your HTML file, using CDN:
<script src="https://cdn.jsdelivr.net/npm/@lacussoft/cpf-val@latest/dist/cpf-val.min.js"></script>
Usage:
cpfVal('12345678909') // returns 'true'
cpfVal('123.456.789-09') // returns 'true'
cpfVal('12345678910') // returns 'false'
^^