summaryrefslogtreecommitdiff
path: root/src/node_modules/chance/docs/location
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2021-12-21 16:52:28 +0100
committerMinteck <contact@minteck.org>2021-12-21 16:52:28 +0100
commit46e43f4bde4a35785b4997b81e86cd19f046b69b (patch)
treec53c2f826f777f9d6b2d249dab556feb72a6c3a6 /src/node_modules/chance/docs/location
downloadlangdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.gz
langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.bz2
langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.zip
Commit
Diffstat (limited to 'src/node_modules/chance/docs/location')
-rw-r--r--src/node_modules/chance/docs/location/address.md21
-rw-r--r--src/node_modules/chance/docs/location/altitude.md29
-rw-r--r--src/node_modules/chance/docs/location/areacode.md16
-rw-r--r--src/node_modules/chance/docs/location/city.md13
-rw-r--r--src/node_modules/chance/docs/location/coordinates.md34
-rw-r--r--src/node_modules/chance/docs/location/country.md23
-rw-r--r--src/node_modules/chance/docs/location/depth.md29
-rw-r--r--src/node_modules/chance/docs/location/geohash.md21
-rw-r--r--src/node_modules/chance/docs/location/latitude.md43
-rw-r--r--src/node_modules/chance/docs/location/locale.md25
-rw-r--r--src/node_modules/chance/docs/location/longitude.md43
-rw-r--r--src/node_modules/chance/docs/location/phone.md41
-rw-r--r--src/node_modules/chance/docs/location/postal.md13
-rw-r--r--src/node_modules/chance/docs/location/postcode.md13
-rw-r--r--src/node_modules/chance/docs/location/province.md33
-rw-r--r--src/node_modules/chance/docs/location/state.md62
-rw-r--r--src/node_modules/chance/docs/location/street.md37
-rw-r--r--src/node_modules/chance/docs/location/zip.md23
18 files changed, 519 insertions, 0 deletions
diff --git a/src/node_modules/chance/docs/location/address.md b/src/node_modules/chance/docs/location/address.md
new file mode 100644
index 0000000..d797ca5
--- /dev/null
+++ b/src/node_modules/chance/docs/location/address.md
@@ -0,0 +1,21 @@
+# address
+
+```js
+// usage
+chance.address()
+chance.address({short_suffix: true})
+```
+
+Generate a random street address
+
+```js
+chance.address();
+=> '5447 Bazpe Lane'
+```
+
+Optionally mandate that it return a short suffix
+
+```js
+chance.address({short_suffix: true});
+=> '536 Baner Rd'
+```
diff --git a/src/node_modules/chance/docs/location/altitude.md b/src/node_modules/chance/docs/location/altitude.md
new file mode 100644
index 0000000..01cc612
--- /dev/null
+++ b/src/node_modules/chance/docs/location/altitude.md
@@ -0,0 +1,29 @@
+# altitude
+
+```js
+// usage
+chance.altitude()
+chance.altitude({ fixed: 7 })
+chance.altitude({ max: 1000 })
+```
+
+Generate a random altitude, in meters.
+
+```js
+chance.altitude()
+=> 1863.21417
+```
+
+By default, includes 5 digits of accuracy after the decimal. Can override with the `fixed` option.
+
+```js
+chance.altitude({ fixed: 7 })
+=> 6897.8978386
+```
+
+By default, max of 8848m (height of Mount Everest), but this can be overridden with the `max` option.
+
+```js
+chance.altitude({ max: 1000 })
+=> 890.20665
+```
diff --git a/src/node_modules/chance/docs/location/areacode.md b/src/node_modules/chance/docs/location/areacode.md
new file mode 100644
index 0000000..df92ac3
--- /dev/null
+++ b/src/node_modules/chance/docs/location/areacode.md
@@ -0,0 +1,16 @@
+# areacode
+
+```js
+// usage
+chance.areacode()
+```
+
+Generate a random area code
+
+```js
+chance.areacode()
+=> '(526)'
+```
+
+*Note, this is a US area code, we have little support for internationalization
+at this time. Hope to fix that in the future!*
diff --git a/src/node_modules/chance/docs/location/city.md b/src/node_modules/chance/docs/location/city.md
new file mode 100644
index 0000000..0916ab4
--- /dev/null
+++ b/src/node_modules/chance/docs/location/city.md
@@ -0,0 +1,13 @@
+# city
+
+```js
+// usage
+chance.city()
+```
+
+Generate a random city name
+
+```js
+chance.city();
+=> 'Cowotba'
+```
diff --git a/src/node_modules/chance/docs/location/coordinates.md b/src/node_modules/chance/docs/location/coordinates.md
new file mode 100644
index 0000000..d1e143b
--- /dev/null
+++ b/src/node_modules/chance/docs/location/coordinates.md
@@ -0,0 +1,34 @@
+# coordinates
+
+```js
+// usage
+chance.coordinates()
+chance.coordinates({fixed: 2})
+chance.coordinates({format: 'dms'})
+```
+
+Generate random coordinates, which are latitude and longitude, comma separated.
+
+```js
+chance.coordinates();
+=> "-29.52974, 24.52815"
+```
+
+By default includes 5 fixed digits after decimal, can specify otherwise.
+
+```js
+chance.coordinates({fixed: 2});
+=> "-49.16, 68.81"
+```
+
+By default cooridnates' format is dd, can specify otherwise.
+
+```js
+chance.coordinates({format: 'ddm'});
+=> "41°44.9592, 25°56.2622"
+```
+
+```js
+chance.coordinates({format: 'dms'});
+=> "56°2’9.8187”, 79°55’40.6812”"
+```
diff --git a/src/node_modules/chance/docs/location/country.md b/src/node_modules/chance/docs/location/country.md
new file mode 100644
index 0000000..1617ad7
--- /dev/null
+++ b/src/node_modules/chance/docs/location/country.md
@@ -0,0 +1,23 @@
+# country
+
+```js
+// usage
+chance.country()
+chance.country({ full: true })
+```
+
+Return a random country.
+
+```js
+chance.country();
+=> 'LT'
+```
+
+By default, returns only the 2 letter ISO 3166-1 code for the country.
+
+Optionally specify that it ought to return a full country name.
+
+```js
+chance.country({ full: true });
+=> 'Venezuela'
+```
diff --git a/src/node_modules/chance/docs/location/depth.md b/src/node_modules/chance/docs/location/depth.md
new file mode 100644
index 0000000..163c3ce
--- /dev/null
+++ b/src/node_modules/chance/docs/location/depth.md
@@ -0,0 +1,29 @@
+# depth
+
+```js
+// usage
+chance.depth()
+chance.depth({ fixed: 2 })
+chance.depth({ min: -1000 })
+```
+
+Generate a random depth, in meters. Depths are always negative
+
+```js
+chance.depth()
+=> -2126.95039
+```
+
+By default, includes 5 digits of accuracy after the decimal. Can override with the `fixed` option.
+
+```js
+chance.depth({ fixed: 2 })
+=> -1542.11
+```
+
+By default, maximum (or minimum depending on your frame of reference) depth of -2550 (depth of the Mariana Trench), but this can be overridden with the `min` option.
+
+```js
+chance.depth({ min: -1000 })
+=> -718.41976
+```
diff --git a/src/node_modules/chance/docs/location/geohash.md b/src/node_modules/chance/docs/location/geohash.md
new file mode 100644
index 0000000..f71eb9a
--- /dev/null
+++ b/src/node_modules/chance/docs/location/geohash.md
@@ -0,0 +1,21 @@
+# geohash
+
+```js
+// usage
+chance.geohash()
+chance.geohash({ length: 5 })
+```
+
+Generate a random geohash. [More details on what a geohash is](http://en.wikipedia.org/wiki/Geohash).
+
+```js
+chance.geohash()
+=> 'h9xhn7y'
+```
+
+By default, includes 7 characters of accuracy. Can override with the `length` option.
+
+```js
+chance.geohash({ length: 5 })
+=> 'dr0kr'
+```
diff --git a/src/node_modules/chance/docs/location/latitude.md b/src/node_modules/chance/docs/location/latitude.md
new file mode 100644
index 0000000..f1b711f
--- /dev/null
+++ b/src/node_modules/chance/docs/location/latitude.md
@@ -0,0 +1,43 @@
+# latitude
+
+```js
+// usage
+chance.latitude()
+chance.latitude({fixed: 7})
+chance.latitude({format: 'dms'})
+```
+
+Generate a random latitude.
+
+```js
+chance.latitude();
+=> 57.99514
+```
+
+_range: -90 to 90_
+
+By default includes 5 fixed digits after decimal, can specify otherwise.
+
+```js
+chance.latitude({fixed: 7});
+=> -29.6443133
+```
+
+By default includes entire range of allowed latitudes, can specify a min and/or max to bound it
+
+```js
+chance.latitude({min: 38.7, max: 38.9});
+=> 38.82358
+```
+
+By default latitudes' format is dd, can specify otherwise.
+
+```js
+chance.latitude({format: 'ddm'});
+=> "41°44.9592"
+```
+
+```js
+chance.latitude({format: 'dms'});
+=> "56°2’9.8187”"
+```
diff --git a/src/node_modules/chance/docs/location/locale.md b/src/node_modules/chance/docs/location/locale.md
new file mode 100644
index 0000000..5d14db4
--- /dev/null
+++ b/src/node_modules/chance/docs/location/locale.md
@@ -0,0 +1,25 @@
+# locale
+
+```js
+// usage
+chance.locale()
+chance.locale({region: true})
+```
+
+Generate a random ISO-639-1 language code
+
+```js
+chance.locale();
+=> 'ca'
+```
+
+Generate a random IETF region code
+
+```js
+chance.locale({region: true});
+=> 'es-EA'
+```
+
+
+_Note, the language codes comes from the [ISO-639-1 spec](http://www.loc.gov/standards/iso639-2/php/code_list.php)
+and the region codes come from [IETF standard](http://data.okfn.org/data/core/language-codes#resource-language-codes-full)_
diff --git a/src/node_modules/chance/docs/location/longitude.md b/src/node_modules/chance/docs/location/longitude.md
new file mode 100644
index 0000000..de1cd34
--- /dev/null
+++ b/src/node_modules/chance/docs/location/longitude.md
@@ -0,0 +1,43 @@
+# longitude
+
+```js
+// usage
+chance.longitude()
+chance.longitude({fixed: 7})
+chance.longitude({format: 'dms'})
+```
+
+Generate a random longitude.
+
+```js
+chance.longitude();
+=> 149.41549
+```
+
+_range: -180 to 180_
+
+By default includes 5 fixed digits after decimal, can specify otherwise.
+
+```js
+chance.longitude({fixed: 7});
+=> 51.4549925
+```
+
+By default includes entire range of allowed longitudes, can specify a min and/or max to bound it
+
+```js
+chance.longitude({min: -78, max: -77});
+=> -77.22644
+```
+
+By default longitude' format is dd, can specify otherwise.
+
+```js
+chance.longitude({format: 'ddm'});
+=> "41°44.9592"
+```
+
+```js
+chance.longitude({format: 'dms'});
+=> "56°2’9.8187”"
+``` \ No newline at end of file
diff --git a/src/node_modules/chance/docs/location/phone.md b/src/node_modules/chance/docs/location/phone.md
new file mode 100644
index 0000000..ba04326
--- /dev/null
+++ b/src/node_modules/chance/docs/location/phone.md
@@ -0,0 +1,41 @@
+# phone
+
+```js
+// usage
+chance.phone()
+chance.phone({ formatted: false })
+chance.phone({ country: "fr" })
+chance.phone({ country: "fr", mobile: true })
+```
+
+Generate a random phone
+
+```js
+chance.phone();
+=> '(494) 927-2152'
+```
+
+By default conforms to [NANP](http://en.wikipedia.org/wiki/North_American_Numbering_Plan) for a proper US phone number.
+
+Optionally disable formatting.
+
+```js
+chance.phone({ formatted: false });
+=> '2617613391'
+```
+
+Optionally specify a country.
+
+```js
+chance.phone({ country: 'fr' });
+=> '01 60 44 92 67'
+```
+
+Note, at current we only have support for `'us'`, `'uk'`, or `'fr'` for countries.
+
+For `uk` and `fr`, optionally specify a mobile phone.
+
+```js
+chance.phone({ country: 'uk', mobile: true });
+=> '07624 321221'
+```
diff --git a/src/node_modules/chance/docs/location/postal.md b/src/node_modules/chance/docs/location/postal.md
new file mode 100644
index 0000000..17510a4
--- /dev/null
+++ b/src/node_modules/chance/docs/location/postal.md
@@ -0,0 +1,13 @@
+# postal
+
+```js
+// usage
+chance.postal()
+```
+
+Return a Canadian Postal code. Returned postal code is valid with respect to the Postal District (first character) and format only.
+
+```js
+chance.postal();
+=> 'R1S 3F4'
+```
diff --git a/src/node_modules/chance/docs/location/postcode.md b/src/node_modules/chance/docs/location/postcode.md
new file mode 100644
index 0000000..fab584f
--- /dev/null
+++ b/src/node_modules/chance/docs/location/postcode.md
@@ -0,0 +1,13 @@
+# postcode
+
+```js
+// usage
+chance.postcode()
+```
+
+Generate a random (U.K.) postcode. Returned postcode is valid with respect to the Postcode Area (first characters) and format only.
+
+```js
+chance.postcode();
+=> 'W6 9PF'
+```
diff --git a/src/node_modules/chance/docs/location/province.md b/src/node_modules/chance/docs/location/province.md
new file mode 100644
index 0000000..bf07618
--- /dev/null
+++ b/src/node_modules/chance/docs/location/province.md
@@ -0,0 +1,33 @@
+# province
+
+```js
+// usage
+chance.province()
+chance.province({full: true})
+chance.province({full: true})
+```
+
+Return a random province.
+
+```js
+chance.province();
+=> 'ON'
+```
+
+By default, returns only the 2 letter abbreviation for province.
+
+Optionally specify that it ought to return a full province name.
+
+```js
+chance.province({full: true});
+=> 'Nova Scotia'
+```
+
+Optionally specify the country from which it should return the province name.
+
+```js
+chance.province({country: 'it', full: true});
+=> 'Vicenza'
+```
+
+Note, currently support for country is limited to: `'ca', 'it'`.
diff --git a/src/node_modules/chance/docs/location/state.md b/src/node_modules/chance/docs/location/state.md
new file mode 100644
index 0000000..81a200b
--- /dev/null
+++ b/src/node_modules/chance/docs/location/state.md
@@ -0,0 +1,62 @@
+# state
+
+```js
+// usage
+chance.state()
+chance.state({ full: true })
+chance.state({ territories: true })
+chance.state({ armed_forces: true })
+chance.state({ us_states_and_dc: false })
+chance.state({ country: 'us' })
+```
+
+Return a random state.
+
+```js
+chance.state();
+=> 'AK'
+```
+
+By default, returns only the 2 letter abbreviation for state.
+
+Optionally specify that it ought to return a full state name.
+
+```js
+chance.state({ full: true });
+=> 'Florida'
+```
+
+Optionally add U.S. Territories ('American Samoa', 'Federated States of Micronesia', 'Guam', 'Marshall Islands', 'Northern Mariana Islands', 'Puerto Rico', 'Virgin Islands, U.S.') to the mix of randomly selected items:
+
+```js
+chance.state({ territories: true, full: true })
+=> 'Guam'
+```
+
+Optionally add Armed Forces to the list as well:
+
+```js
+chance.state({ armed_forces: true, full: true })
+=> 'Armed Forces Pacific'
+```
+
+For all U.S. states, territories, and armed forces, specify all of them:
+
+```js
+chance.state({ armed_forces: true, territories: true })
+=> 'NY'
+```
+
+For just territories or armed forces, specify that it ought not return U.S. states:
+
+```js
+chance.state({ territories: true, us_states_and_dc: false })
+=> 'PR'
+```
+
+Optionally specify a country (US specific options are ignored if country is specified and different from `'us'`):
+
+```js
+chance.state({ country: 'it', full: true })
+=> 'Toscana'
+```
diff --git a/src/node_modules/chance/docs/location/street.md b/src/node_modules/chance/docs/location/street.md
new file mode 100644
index 0000000..91ec1ba
--- /dev/null
+++ b/src/node_modules/chance/docs/location/street.md
@@ -0,0 +1,37 @@
+# street
+
+```js
+// usage
+chance.street()
+chance.street({country:it})
+```
+
+Generate a random street
+
+```js
+chance.street();
+=> 'Tesca Circle'
+```
+
+Optionally mandate that it returns a short suffix
+
+```js
+chance.street({short_suffix: true});
+=> 'Jiled St'
+```
+
+Optionally specify the number of syllables used to generate the street name
+
+```js
+chance.street({syllables: 8});
+=> 'Teniefitinusewjircor Junction'
+```
+
+Optionally specify a country to localize street prefixes
+
+```js
+chance.street({country: 'it'});
+=> 'Via Nefba'
+```
+
+Note, currently support for country is limited to: `'us', 'it'`.
diff --git a/src/node_modules/chance/docs/location/zip.md b/src/node_modules/chance/docs/location/zip.md
new file mode 100644
index 0000000..e3311b4
--- /dev/null
+++ b/src/node_modules/chance/docs/location/zip.md
@@ -0,0 +1,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