SB-6.1-PRE
This commit is contained in:
1 parent
690169a409
commit
358a25f522
3760 files changed
+300059
-36
No files matched your search
+63
@@ -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'`.
|
||||
|
||||
Reference in new issue
Block a user