verify-address

    1.0.1 • Public • Published

    verify-address

    Build Status Code Climate Test Coverage Version Downloads

    Super lightweight address verification courtesy of Lob.

    Install

    $ npm install --save verify-address
    

    Usage

    var verify = require('address-verify')
     
    verify({
      address_line1: '255 King St',
      address_line2: '414',
      address_city: 'San Francisco',
      address_state: 'CA',
      address_zip: '94107',
      address_country: 'US'
    }, console.log)
    // => { 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

    Install

    npm i verify-address

    DownloadsWeekly Downloads

    5

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar