diff options
author | Minteck <contact@minteck.org> | 2021-12-21 16:52:28 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2021-12-21 16:52:28 +0100 |
commit | 46e43f4bde4a35785b4997b81e86cd19f046b69b (patch) | |
tree | c53c2f826f777f9d6b2d249dab556feb72a6c3a6 /src/node_modules/chance/docs/person | |
download | langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.gz langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.bz2 langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.zip |
Commit
Diffstat (limited to 'src/node_modules/chance/docs/person')
-rw-r--r-- | src/node_modules/chance/docs/person/aadhar.md | 31 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/age.md | 25 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/birthday.md | 55 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/cf.md | 23 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/cpf.md | 13 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/first.md | 31 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/gender.md | 21 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/last.md | 23 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/name.md | 63 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/prefix.md | 35 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/ssn.md | 29 | ||||
-rw-r--r-- | src/node_modules/chance/docs/person/suffix.md | 25 |
12 files changed, 374 insertions, 0 deletions
diff --git a/src/node_modules/chance/docs/person/aadhar.md b/src/node_modules/chance/docs/person/aadhar.md new file mode 100644 index 0000000..54a816d --- /dev/null +++ b/src/node_modules/chance/docs/person/aadhar.md @@ -0,0 +1,31 @@ +# aadhar + +_Aadhar_ (English: Foundation) is a 12-digit unique identity number that can be obtained by residents of India, based on their biometric and demographic data. + +```js +// usage +chance.aadhar() +chance.aadhar({ onlyLastFour: true }) // false by default +chance.aadhar({ separatedByWhiteSpace: false }) // true by default +``` + +Generate a random aadhar. + +```js +chance.aadhar(); +=> '8506 7820 9696' +``` + +Optionally provide option of getting only the last four + +```js +chance.aadhar({ onlyLastFour: true }); +=> '1851' +``` + +Optionally specify dashes be removed + +```js +chance.aadhar({ separatedByWhiteSpace: false }); +'873300307032' +``` diff --git a/src/node_modules/chance/docs/person/age.md b/src/node_modules/chance/docs/person/age.md new file mode 100644 index 0000000..4a51b7d --- /dev/null +++ b/src/node_modules/chance/docs/person/age.md @@ -0,0 +1,25 @@ +# age + +```js +// usage +chance.age() +chance.age({ type: 'child' }) +``` + +Generate a random age + +```js +chance.age(); +=> 45 +``` + +Default range is between 1 and 120 + +Optionally specify one of a handful of enumerated age types: + +```js +chance.age({type: 'child'}); +=> 9 +``` + +Allowed types are: `child`, `teen`, `adult`, `senior` diff --git a/src/node_modules/chance/docs/person/birthday.md b/src/node_modules/chance/docs/person/birthday.md new file mode 100644 index 0000000..a7f4ca9 --- /dev/null +++ b/src/node_modules/chance/docs/person/birthday.md @@ -0,0 +1,55 @@ +# birthday + +```js +// usage +chance.birthday() +chance.birthday({ string: true }) +chance.birthday({ type: 'child' }) +``` + +Generate a random birthday + +```js +chance.birthday(); +=> Fri Aug 16 1985 00:00:00 GMT-0400 (EDT) +``` + +By default, returns an actual JavaScript [Date][Date] object. + +Optionally specify it be returned as a string. + +```js +chance.birthday({string: true}); +=> '4/1/1968' +``` + +By default returns in MM/DD/YYYY format. Can specify DD/MM/YYYY as follows: + +```js +chance.birthday({string: true, american: false}); +=> '28/6/1993' +``` + +For more complex date formats, use the [Moment][Moment] library. + +Can also specify the type, same types as with [age](#age). + +```js +chance.birthday({type: 'child'}); +=> Sat Sep 08 2001 00:00:00 GMT-0400 (EDT) +``` + +You can also compose with `chance.year` for interesting combinations. For example, let's say we want to get the birthdays of some renaissance artists (born between 1450 and 1500). We can generate a year and then get a birthday from that year: + +```js +var year = chance.year({ min: 1450, max: 1500 }); +chance.birthday({ year: year }); +=> Wed Aug 27 1484 11:24:14 GMT-0400 (EDT) + +// Could be simplified down to one line +chance.birthday({ year: chance.year({ min: 1450, max: 1500 }) }); +=> Fri Nov 26 1469 09:17:13 GMT-0500 (EST) +``` + +[Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date +[Moment]: http://momentjs.com diff --git a/src/node_modules/chance/docs/person/cf.md b/src/node_modules/chance/docs/person/cf.md new file mode 100644 index 0000000..8569584 --- /dev/null +++ b/src/node_modules/chance/docs/person/cf.md @@ -0,0 +1,23 @@ +# cf + +```js +// usage +chance.cf() +``` +Generate a random Italian social security number (Codice Fiscale). + +```js +chance.cf(); +=> 'BRSMRT87S49A988X' +``` + +Optionally specify any or all components: first name, last name, gender, birth date, place of birth (using ISTAT geocodes for Italian cities). + +```js +chance.cf({first: 'Sergio', last: 'Leone'}); +=> 'LNESRG93P28F067V' + +chance.cf({first: 'Sophia', last: 'Loren', gender: 'Female', birthday: new Date(1934,8,20), city: 'h501'}); + +=> 'LRNSPH34P60H501G' +``` diff --git a/src/node_modules/chance/docs/person/cpf.md b/src/node_modules/chance/docs/person/cpf.md new file mode 100644 index 0000000..5459616 --- /dev/null +++ b/src/node_modules/chance/docs/person/cpf.md @@ -0,0 +1,13 @@ +# cpf + +```js +// usage +chance.cpf() +``` + +Generate a random Brazilian tax id. + +```js +chance.cpf(); +=> '607.116.899-62' +``` diff --git a/src/node_modules/chance/docs/person/first.md b/src/node_modules/chance/docs/person/first.md new file mode 100644 index 0000000..cd92644 --- /dev/null +++ b/src/node_modules/chance/docs/person/first.md @@ -0,0 +1,31 @@ +# first + +```js +// usage +chance.first() +chance.first({ nationality: 'us' }) +``` + +Generate a random first name + +```js +Chance.first(); +=> 'Leila' +``` + +Optionally specify a gender to limit first names to that gender + +```js +Chance.first({ gender: "female" }); +=> 'Emma' +``` + +Optionally specify a nationality to limit first names to those most common of that nationality + +```js +Chance.first({ nationality: "it" }); +=> 'Alberto' +``` + +Note, currently support for nationality is limited to: `'us', 'it'`. + diff --git a/src/node_modules/chance/docs/person/gender.md b/src/node_modules/chance/docs/person/gender.md new file mode 100644 index 0000000..d41766b --- /dev/null +++ b/src/node_modules/chance/docs/person/gender.md @@ -0,0 +1,21 @@ +# gender + +```js +// usage +chance.gender() +``` + +Generate a random gender + +```js + Chance.gender(); + => 'Female' +``` + +Extra genders can be provided using the `extraGenders` key in the optional options argument: + +```js + Chance.gender({ + extraGenders: ['Agender', 'Genderqueer', 'Trans', 'Pangender'] + }); +``` diff --git a/src/node_modules/chance/docs/person/last.md b/src/node_modules/chance/docs/person/last.md new file mode 100644 index 0000000..304e1c5 --- /dev/null +++ b/src/node_modules/chance/docs/person/last.md @@ -0,0 +1,23 @@ +# last + +```js +// usage +chance.last() +chance.last({ nationality: 'en' }) +``` + +Generate a random last name + +```js +Chance.last(); +=> 'Mago' +``` + +Optionally specify a nationality to limit first names to those most common of that nationality + +```js +Chance.last({ nationality: 'it' }); +=> 'Giovannini' +``` + +Note, currently support for nationality is limited to: `'en', 'it', 'nl', 'uk', 'de', 'jp', 'es', 'fr'`. diff --git a/src/node_modules/chance/docs/person/name.md b/src/node_modules/chance/docs/person/name.md new file mode 100644 index 0000000..46ae9e9 --- /dev/null +++ b/src/node_modules/chance/docs/person/name.md @@ -0,0 +1,63 @@ +# name + +```js +// usage +chance.name() +chance.name({ middle: true }) +chance.name({ middle_initial: true }) +chance.name({ prefix: true }) +chance.name({ nationality: 'en' }) +``` + +Generate a random name + +```js + chance.name(); + => 'Dafi Vatemi' +``` + +Optionally include the middle name + +```js + chance.name({ middle: true }); + => 'Nelgatwu Powuku Heup' +``` + + +Optionally include the middle initial + +```js + chance.name({ middle_initial: true }); + => 'Ezme I Iza' +``` + +Optionally include the prefix + +```js + chance.name({ prefix: true }); + => 'Doctor Suosat Am' +``` + +Optionally include the suffix + +```js + chance.name({ suffix: true }); + => 'Fanny Baker Esq.' +``` + +Optionally specify a gender + +```js + chance.name({ gender: 'male' }); + => "Patrick Copeland" +``` + +Optionally specify a nationality + +```js + chance.name({ nationality: 'it' }); + => "Roberta Mazzetti" +``` + +Note, currently support for nationality is limited to: `'en', 'it'`. + diff --git a/src/node_modules/chance/docs/person/prefix.md b/src/node_modules/chance/docs/person/prefix.md new file mode 100644 index 0000000..0f5c502 --- /dev/null +++ b/src/node_modules/chance/docs/person/prefix.md @@ -0,0 +1,35 @@ +# prefix + +```js +// usage +chance.prefix() +chance.prefix({ full: true }) +``` + +Generate a random name prefix + +```js +chance.prefix(); +=> 'Mrs.' +``` + +By default, returns the shorter version. + +Optionally get back the full version. + +```js +chance.prefix({ full: true }); +=> 'Mister' +``` + +Optionally specify a gender. Valid options are `male`, `female`, or `all` (the default). + +```js +chance.prefix({ gender: "male" }); +=> 'Mr.' + +chance.prefix({ gender: "female" }); +=> 'Miss' +``` + +*To maintain legacy support, this also responds to chance.name_prefix().* diff --git a/src/node_modules/chance/docs/person/ssn.md b/src/node_modules/chance/docs/person/ssn.md new file mode 100644 index 0000000..c3f1f88 --- /dev/null +++ b/src/node_modules/chance/docs/person/ssn.md @@ -0,0 +1,29 @@ +# ssn + +```js +// usage +chance.ssn() +chance.ssn({ ssnFour: true }) +chance.ssn({ dashes: false }) +``` + +Generate a random social security number. + +```js +chance.ssn(); +=> '411-90-0070' +``` + +Optionally provide option of getting only the last four + +```js +chance.ssn({ ssnFour: true }); +=> '2938' +``` + +Optionally specify dashes be removed + +```js +chance.ssn({ dashes: false }); +=> '293839295' +``` diff --git a/src/node_modules/chance/docs/person/suffix.md b/src/node_modules/chance/docs/person/suffix.md new file mode 100644 index 0000000..1055e0c --- /dev/null +++ b/src/node_modules/chance/docs/person/suffix.md @@ -0,0 +1,25 @@ +# suffix + +```js +// usage +chance.suffix() +chance.suffix({ full: true }) +``` + +Generate a random name suffix + +```js +chance.suffix(); +=> 'Sr.' +``` + +By default, returns the shorter version. + +Optionally get back the full version. + +```js +chance.suffix({ full: true }); +=> 'Juris Doctor' +``` + +*To maintain legacy support, this also responds to chance.name_suffix().* |