Skip to content

bsiddiqui/verify-address

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

verify-address

Build Status Code Climate Test Coverage Version Downloads

This project is deprecated. I recommend using Lob's API directly.

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

Validated address object if address is found

message

Type: string

Details if only a partial match is found and more information is needed

About

simple address verification

Resources

License

Stars

Watchers

Forks

Packages

No packages published