summaryrefslogtreecommitdiff
path: root/src/node_modules/chance/docs/location/zip.md
blob: e3311b4677f68e21e4597631dd87c72d15a7c77d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# zip

```js
// usage
chance.zip()
chance.zip({plusfour: true})
```

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

```js
chance.zip();
=> '90210'
```

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

```js
chance.zip({plusfour: true});
=> '01035-1838'
```

[zip+4]: http://vq.io/19rzsve