forked from zuriby/Faker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
name.js
34 lines (28 loc) · 874 Bytes
/
name.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var faker = require('../index');
var _name = {
firstName: function () {
return faker.random.first_name();
},
//Working as intended
firstNameFemale: function () {
return faker.random.first_name();
},
//Working as intended
firstNameMale: function () {
return faker.random.first_name();
},
lastName: function () {
return faker.random.last_name();
},
findName: function () {
var r = faker.random.number(8);
switch (r) {
case 0:
return faker.random.name_prefix() + " " + faker.Name.firstName() + " " + faker.Name.lastName();
case 1:
return faker.Name.firstName() + " " + faker.Name.lastName() + " " + faker.random.name_suffix();
}
return faker.Name.firstName() + " " + faker.Name.lastName();
}
};
module.exports = _name;