diff options
| author | Marak <[email protected]> | 2014-09-21 08:39:08 +0200 |
|---|---|---|
| committer | Marak <[email protected]> | 2014-09-21 10:28:41 +0200 |
| commit | 970be2ef22f1b5895f3880c5f54251b93fdf368a (patch) | |
| tree | 312f2da0b0336b39c22c7ace01332324d1741596 /lib/random.js | |
| parent | 7fb1370ddcedd9fd1aa77209aa96be99de5d5b87 (diff) | |
| download | faker-970be2ef22f1b5895f3880c5f54251b93fdf368a.tar.xz faker-970be2ef22f1b5895f3880c5f54251b93fdf368a.zip | |
[api] Added hacker module. Added default values for all methods. Cleaned up errant methods. Added mustache helper.
Diffstat (limited to 'lib/random.js')
| -rw-r--r-- | lib/random.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/random.js b/lib/random.js index d4dcbc15..ada5ed86 100644 --- a/lib/random.js +++ b/lib/random.js @@ -37,6 +37,7 @@ var random = { // takes an array and returns the array randomly sorted array_element: function (array) { + array = array || ["a", "b", "c"]; var r = faker.random.number({ max: array.length - 1 }); return array[r]; }, |
