2.1.0 • Published 2 years ago

curp-ts v2.1.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

NPM Version Build and test CodeQL Deploy curp-ts

curp-ts

Genera y valida el CURP (Clave Única de Registro de Población) mexicano.

This is the Typescript version of the npm curp package

Instalación

npm install curp-ts

Uso:

Validar

import { validar } from 'curp-ts';

validar('LOOA531113HTCPBN07'); // returns true

Generar

import { generar, Persona, GENERO, ESTADO } from 'curp-ts';

const persona: Persona = {
  nombre: 'Andrés Manuel',
  apellidoPaterno: 'López',
  apellidoMaterno: 'Obrador',
  genero: GENERO.MASCULINO,
  fechaNacimiento: '13-11-1953',
  estado: ESTADO.TABASCO,
};
generar(persona); // returns LOOA531113HTCPBN07

Licencia

MIT © Leonardo Lira Becerra

2.1.0

2 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

0.1.3

3 years ago