1.3.3 • Published 8 months ago
mexican-utils v1.3.3
MEXICAN-UTILS
ES 
Esta es una librería diseñada para tener centralizadas todas las utilidades que suelen ser usadas para sistemas mexicanos, con opción de utilizar en CommonJS o ESM.
Instalación
npm install mexican-utils --saveUso
- Crear un CURP
 
import { createCURP } from "mexican-utils";
const CURP = createCURP(
  "Andrés Manuel", // Nombre
  "López", // Apellido paterno
  "male", // Género
  "tabasco", // Estado
  "1953-11-13", // Fecha de nacimiento (YYYY-MM-DD)
  "Obrador" // Apellido materno (opcional). Cadena de texto vacía por defecto
);
console.log(CURP);
// Resultado: "LOOA531113HTCPBN07"- Validar un CURP
 
import { validateCURP } from "mexican-utils";
const isValidCURP = validateCURP("LOOA531113HTCPBN07");
console.log(isValidCURP);
// Resultado: trueFuentes
Esta librería está hecha tomando como ejemplo lo siguiente:
CURP:
RFC: Trabajo en curso 🛠️
EN 
This is a library designed to have centralized all the utilities that are usually used for Mexican systems, with the option to use in CommonJS or ESM.
Installation
npm install mexican-utils --saveUsage
- Create a CURP
 
import { createCURP } from "mexican-utils";
const CURP = createCURP(
  "Andrés Manuel", // Name
  "López", // Paternal surname
  "male", // Genre
  "tabasco", // State
  "1953-11-13", // Date of birth (YYYY-MM-DD)
  "Obrador" // Maternal surname (optional). Empty string by default
);
console.log(CURP);
// Output: "LOOA531113HTCPBN07"- Validate a CURP
 
import { validateCURP } from "mexican-utils";
const isValidCURP = validateCURP("LOOA531113HTCPBN07");
console.log(isValidCURP);
// Output: trueSources
This library is built using the following as an example:
CURP:
RFC: Work in progress 🛠️