/codigo-postal

Get postal code from Correos de Chile

Primary LanguageJavaScriptMIT LicenseMIT

codigo-postal

npm version npm downloads Build Status Coverage Status Maintainability dependency Status devDependency Status

Get postal code from Correos de Chile

Installation

npm i -S codigo-postal

Use

Try on Tonic

const codigoPostal = require('codigo-postal')

const data = {
  address: 'avenida siempreviva',
  number: 742,
  commune: 'springfield'
}

codigoPostal(data).then(console.log)

Result:

{
  zip: XXXXX, // a number
  address: XXXXX, // a string
  number: XXXXX, // a string
  commune: XXXXX, // a string
}

License

MIT