Validate and generate CC (Citizen Identity Card) and NIF (Personal Tax Number) numbers.
Supports ESM and CommonJS (require/import).
$ yarn add validate-pt-id
$ npm install validate-pt-id
$ pnpm install validate-pt-id
import { generateNif } from 'validate-pt-id';
const nif = generateNif(); // 238043266
import { validateNif } from 'validate-pt-id';
const isValidNif = validateNif('238043266'); // true
import { generateCc } from 'validate-pt-id';
const cc = generateCc(); // 168893797ZY2
import { validateCc } from 'validate-pt-id';
const isValidCc = validateCc('168893797ZY2'); // true