cnpj
TypeScript icon, indicating that this package has built-in type declarations

4.0.3 • Public • Published

CNPJ

Format, validate and generate CNPJ numbers.

Installation

Deno

import { validate, format, generate } from 'https://deno.land/x/cnpj/mod.ts';

Node

npm install cnpj
import { validate, format, generate } from 'cnpj';

Usage

// Validation
const valid = validate('38.981.218/0001-47'); // true

// Format
const formatted = format(88415345000157) // 88.415.345/0001-57

// Generation
const generated = generate(); // randomly generated, valid CNPJ

License

MIT License © Gabriel Silva

Package Sidebar

Install

npm i cnpj

Weekly Downloads

3,782

Version

4.0.3

License

MIT

Unpacked Size

3.37 kB

Total Files

4

Last publish

Collaborators

  • gabrielizaias