You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
497 B
32 lines
497 B
4 weeks ago
|
# 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'`.
|
||
|
|