Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

random-zipcode

mock-end159MIT1.0.2

Generate a random (U.S.) zip code.

zip, zipcode, U.S., location, random, randomly, randomize, chance, test, dice, mock

readme

random-zipcode

Generate a random (U.S.) zip code.

MIT License

build:? coverage:?

Install

$ npm install --save random-zipcode 

Usage

var randomZip = require('random-zipcode');

// API
// - randomZip();
// - randomZip(plusFour);

randomZip();
// => '90210'

Can optionally specify that it ought to return a Zip+4:

randomZip(true);
// => '01035-1838'

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.