Giter Club home page Giter Club logo

clavesmx.js's Introduction

ClavesMX.js

  • @TODO Eliminar Palabras inconvenientes de la clave CURP
  • @TODO Test con nombres comunes
  • @TODO Test RFC con datos reales para diferentes casos y excepciones

ClavesMX.js es una pequeña libreria para generar claves unicas utilizadas en documentos oficiales en México aún falta hacer una serie de pruebas con datos reales para comparar.

  • RFC para Persona Física.
  • RFC para Persona Moral
  • CURP

Como utilizar ClavesMX.js

```html <script> // Se genera una instancia var CMX = new ClavesMX(); </script> ```

RFC Persona Física.

```html <script> var resultado = CMX.RFCPersonaFisica({ paterno: 'DE PEREZ' , materno: 'LOPEZ' , nombre: 'JUAN' , nacimiento: { month : 3 , year : 1963 , day : 5 } }); // RFC => PELJ6303052A9 </script> ```

RFC Persona Moral

```html <script> var resultado = CMX.RFCPersonaMoral({ nombre: 'Sonora Industrial Azucarera, S. de R.L.' , fecha: { month : 11, year : 1982, day : 29 } }); // RFC => SIA821129 </script> ```

CURP

La clave CURP consta de 18 caracteres desafortunadamente los 2 últimos caracteres son asignados por el gobierno y no viene el algoritmo para generarlo. ```html <script> var CMX = new ClavesMX(); var resultado = CMX.CURP({ paterno: 'LECHUGA' , materno: 'AMADOR' , nombre: 'RAMÓN ALEJANDRO' , nacimiento: { month : 11, year : 1985, day : 14 } , sexo: 'H' , estado: 'BAJA CALIFORNIA' }); // CURP => LEAR851114HBCCMM </script> ```

clavesmx.js's People

Contributors

alejandrolechuga avatar

Stargazers

M1ndBlast avatar Angus H. avatar Jesús Urias avatar

Watchers

 avatar James Cloos avatar Benjamin Granados avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.