br-utils
Version:
Utility resources to deal with Brazilian-related data.
76 lines (50 loc) • 3.47 kB
Markdown
# br-utils for JavaScript
[](https://npmjs.com/package/br-utils)
[](https://bundlephobia.com/package/br-utils)
[](https://npmjs.com/package/br-utils)
[](https://github.com/LacusSolutions/br-utils-js/actions)
[](https://github.com/LacusSolutions/br-utils-js)
[](https://github.com/LacusSolutions/br-utils-js/blob/main/LICENSE)
Toolkit to handle the main operations with Brazilian-related data for JavaScript/TypeScript programming language:
- CPF (personal ID) ((View Demo)[https://cpf-utils.vercel.app/] | (Ver demonstração)[https://cpf-utils.vercel.app/])
- CNPJ (employer ID) ((View Demo)[https://cnpj-utils.vercel.app/] | (Ver demonstração)[https://cpf-utils.vercel.app/])
## Browser Support
|  |  |  |  |  |  |
|--- | --- | --- | --- | --- | --- |
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
## Installation
```bash
# using NPM
$ npm install --save br-utils
# using Bun
$ bun add br-utils
```
## Import
```js
// 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:
```html
<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:
- [CNPJ utilities](https://github.com/LacusSolutions/br-utils-js/tree/main/packages/cnpj-utils#readme)
- [CPF utilities](https://github.com/LacusSolutions/br-utils-js/tree/main/packages/cpf-utils#readme)
## Contribution & Support
We welcome contributions! Please see our [Contributing Guidelines](./CONTRIBUTING.md) for details. But if you find this project helpful, please consider:
- ⭐ Starring the repository
- 🤝 Contributing to the codebase
- 💡 [Suggesting new features](https://github.com/LacusSolutions/br-utils-js/issues)
- 🐛 [Reporting bugs](https://github.com/LacusSolutions/br-utils-js/issues)
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/LacusSolutions/br-utils-js/blob/main/LICENSE) file for details.
## Changelog
See [CHANGELOG](tps://github.com/LacusSolutions/br-utils-js/blob/main/CHANGELOG.md) for a list of changes and version history.
---
Made with ❤️ by [Lacus Solutions](https://github.com/LacusSolutions)