@lacussoft/cnpj-val
v2.0.2
Published
Utility function to validate CNPJ (Brazilian employer ID)
Maintainers
Readme

Utility function to validate CNPJ (Brazilian employer ID).
Browser Support
|
|
|
|
|
|
|
|--- | --- | --- | --- | --- | --- |
| Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | Latest ✔ | 11 ✔ |
Installation
# using NPM
$ npm install --save @lacussoft/cnpj-val
# using Bun
$ bun add @lacussoft/cnpj-valImport
// 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'
^^Contribution & Support
We welcome contributions! Please see our Contributing Guidelines for details. But if you find this project helpful, please consider:
- ⭐ Starring the repository
- 🤝 Contributing to the codebase
- 💡 Suggesting new features
- 🐛 Reporting bugs
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
