verify-address
Super lightweight address verification courtesy of Lob.
Install
$ npm install --save verify-address
Usage
var verify = // => { valid: true, address: {...}}
API
verify(address, callback)
-> undefined
address
Required
Type: object
The address to verify
- address_line1: optional
- address_line2: optional
- address_city: optional
- address_state: optional
- address_zip: optional
- address_country: optional (2 letter country short-name code (ISO 3316))
callback
Required
Type: function
Arguments: err, response
The response
contains:
valid
Type: boolean
Whether the address is valid or not
address
Type: object
message
Type: string
Details if only a partial match is found and more information is needed