Generate a random US zipcode
npm install zipcodes-usaGenerate random identity with a valid standard (not P.O. Box or APO) zip code.
This package was developed specifically for testing an e-commerce system that requires a valid US zip code for shipping cost calculation. Invalid zip codes, or those designated for Post Office Boxes (or APO) caused unexpected test failures.
Zip code data for this package originated from the US Government.
Other random identity information (name, street address, phone number, email address) is generated from faker
Installation is simple and straightforward:
```
npm install --save zipcodes-usa
`
var zipcodes-usa = require('zipcodes-usa')
zipcodes-usa.random()
// => JSON object with {name, address, city, state, zip, phone, email}
`
This project is licensed under the MIT License
This is an async function, so usage looks like this:
`
var zips = require('zicodes-usa')
zips.google().then((data) => {
console.log(data);
});
// -> {"name": xxxx, "address": xxxx, "city": xxxx, "state": XX, "zipcode": xxxx, "phone": xxxx, "email": xxxx, "company": xxxx}
``
For bugs and feature requests, please create an issue