Skip to content

LacusSolutions/br-utils-js

br-utils for JavaScript

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

Toolkit to handle the main operations with Brazilian-related data for JavaScript/TypeScript programming language:

  • CPF (personal ID) (demo)
  • CNPJ (employer ID) (demo)

Browser Support

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

Installation

# using NPM
$ npm install --save br-utils

# using Bun
$ bun add br-utils

Import

// Common JS syntax:
const brUtils = require('br-utils')

// ES Module syntax:
import brUtils from 'br-utils'
// or get the specific function with ES tree-shaking:
import { cpf as cpfUtils, cnpj as cnpjUtils } from 'br-utils'

or import it through your HTML file, using CDN:

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

API

Check out the API details for each submodule of the package:

Contribution & Support

We welcome contributions! Please see our Contributing Guidelines for details. But if you find this project helpful, please consider:

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

See CHANGELOG for a list of changes and version history.


Made with ❤️ by Lacus Solutions