JSPM

sdq

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q34193F
  • License MIT

Utility functions to validate cédula and RNC!

Package Exports

  • sdq

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (sdq) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

sdq

📦 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

  1. Clone and fork this repo.
  2. Install dependencies: yarn or npm install.
  3. Run tests.
  4. Prepare a pull request.

Test

  • yarn test — to run all tests.
  • yarn test -- --watch — to run all tests in watch mode.

Publish

  1. Bump package version: yarn version --new-version x.x.x -m 'Version %s.'.
  2. Publish to NPM registry: npm publish.
  3. Push new tag: git push origin --tags.

Made with ❤️ by all contributors.

MIT license