rutificador
v1.4.0
Published
Get chilean RUT from people's name
Downloads
33
Readme
rutificador
Get chilean RUT from people's name from http://chile.rutificador.com.
Install
With npm
:
npm install --save rutificador
With yarn
:
yarn add rutificador
Usage
const rutificador = require('rutificador')
rutificador({ name: 'Juán Perez' }).then(juanitos => {
console.log(juanitos)
}).catch(err => {
// Do something
})
This prints:
[ { name: 'JUAN PEREZ DUQUE', rut: 'XXXXXXX-6' },
{ name: 'RAUL JUAN PEREZ MONTENEGRO', rut: 'XXXXXXX-0' },
{ name: 'JUAN PEREZ ROJAS', rut: 'XXXXXXX-6' },
... ]
Also you can match by RUT:
rutificador({ rut: 'XXXXXXX-0' }).then(resp => {
// ...
})
Tests
npm test
# or
yarn test