diff options
| author | Ben Southgate <[email protected]> | 2015-12-02 23:02:18 -0800 |
|---|---|---|
| committer | Marak <[email protected]> | 2016-03-03 05:14:05 -0500 |
| commit | d2a70d71817e2b4e1062a0bc777933705bf1c626 (patch) | |
| tree | 0505dfb1579757fdf33051e9383100dc61ea3a95 /lib/helpers.js | |
| parent | c4c7a695f8121566d3536997d118b3c85ddff188 (diff) | |
| download | faker-d2a70d71817e2b4e1062a0bc777933705bf1c626.tar.xz faker-d2a70d71817e2b4e1062a0bc777933705bf1c626.zip | |
remove Math.random() calls to utilize faker.seed()
Conflicts:
lib/internet.js
lib/random.js
Diffstat (limited to 'lib/helpers.js')
| -rw-r--r-- | lib/helpers.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/helpers.js b/lib/helpers.js index 6434baa3..ac3398d7 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -68,7 +68,7 @@ var Helpers = function (faker) { if (string.charAt(i) == "#") { str += faker.random.number(9); } else if (string.charAt(i) == "?") { - str += alpha[Math.floor(Math.random() * alpha.length)]; + str += faker.random.arrayElement(alpha); } else { str += string.charAt(i); } @@ -241,9 +241,9 @@ var Helpers = function (faker) { "account" : faker.finance.account() }; }; - + return self; - + }; @@ -255,4 +255,4 @@ String.prototype.capitalize = function () { //v1.0 }; */ -module['exports'] = Helpers;
\ No newline at end of file +module['exports'] = Helpers; |
