forked from zuriby/Faker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e7b4b8
commit 9a3606c
Showing
2 changed files
with
15 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,22 @@ | ||
var Helpers = require('./helpers'); | ||
var definitions = require('./definitions'); | ||
|
||
/* | ||
exports.first_name = function(){ | ||
return definitions.first_name()[0]; | ||
//Math.floor(Math.random()*10); | ||
}; | ||
*/ | ||
|
||
exports.findName = function() { | ||
var r = Helpers.randomNumber(8); | ||
switch(r) | ||
{ | ||
case 0: | ||
return Helpers.randomize(definitions.name_prefix()) + " " + Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); | ||
break; | ||
case 1: | ||
return Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); + " " + Helpers.randomize(definitions.name_suffix); | ||
break; | ||
} | ||
|
||
return Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); | ||
|
||
exports.findName = function () { | ||
var r = Helpers.randomNumber(8); | ||
switch (r) { | ||
case 0: | ||
return Helpers.randomize(definitions.name_prefix()) + " " + Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); | ||
case 1: | ||
return Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()) + " " + Helpers.randomize(definitions.name_suffix); | ||
} | ||
|
||
return Helpers.randomize(definitions.first_name()) + " " + Helpers.randomize(definitions.last_name()); | ||
}; | ||
|
||
exports.firstName = function () { | ||
return Helpers.randomize(definitions.first_name()); | ||
return Helpers.randomize(definitions.first_name()); | ||
}; | ||
|
||
exports.lastName = function () { | ||
return Helpers.randomize(definitions.last_name()); | ||
return Helpers.randomize(definitions.last_name()); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters