sdq
sdq copied to clipboard
📦 Utility functions to validate cédula and RNC!
Features
- Validate Cédula de Identidad Electoral.
- Validate RNC (Registro Nacional del Contribuyente).
- Only 1.98KB (1.03 gzipped)!
Installation
yarn add sdq
or
npm install sdq --save
Usage
import sdq from 'sdq'
sdq.isCedula('xxx-yyyyyyy-z') // Returns true/false.
sdq.isRnc('aaa-bbbbb-c') // Returns true/false.
Development
- Clone and fork this repo.
- Install dependencies:
yarnornpm install. - Run tests.
- Prepare a pull request.
Test
yarn test— to run all tests.yarn test -- --watch— to run all tests in watch mode.
Publish
- Bump package version:
yarn version --new-version x.x.x -m 'Version %s.'. - Publish to NPM registry:
npm publish. - Push new tag:
git push origin --tags.
Made with :heart: by all contributors.
MIT license