@lacussoft/cnpj-val
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

LacusSoft :: cnpj-val

NPM Latest Version Downloads Count Bundle Size Test Status Last Update Date Project License

Basic function to validate CNPJ (Brazilian ID document).

Browser Support

Chrome Firefox Safari Opera Edge IE
Latest Latest Latest Latest Latest 11

Installation

$ npm install @lacussoft/cnpj-val

Import

// ES Modules
import cnpjVal from '@lacussoft/cnpj-val'

// Common JS
const cnpjVal = require('@lacussoft/cnpj-val')

or import it through your HTML file, using CDN:

<script src="https://cdn.jsdelivr.net/npm/@lacussoft/cnpj-val@latest/dist/cnpj-val.min.js"></script>

Usage:

cnpjVal('98765432000198')      // returns 'true'

cnpjVal('98.765.432/0001-98')  // returns 'true'

cnpjVal('98765432000199')      // returns 'false'
                     ^^

Package Sidebar

Install

npm i @lacussoft/cnpj-val

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

107 kB

Total Files

9

Last publish

Collaborators

  • juliolmuller