Get chilean RUT from people's name or vice versa from Rutify – Rutificador.
npm install --save rutificador
// Packages
const rutify = require('rutificador')
// Search by name
rutify({ name: 'Juán Perez' }).then(juanitos => {
console.log(juanitos)
})
// Search by RUT
rutify({ rut: 'xxxxxxxxx' }).then(results => {
console.log(results)
})
rutify(opts : Object) => Promise
opts
rut
: The chilean RUT (DNI), example189726317
or18.972.631-7
.name
: The name you want to search.