diff options
Diffstat (limited to 'lib/random.js')
| -rw-r--r-- | lib/random.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/random.js b/lib/random.js index a052ecc6..f1a4dfbd 100644 --- a/lib/random.js +++ b/lib/random.js @@ -17,6 +17,11 @@ var random = { * Generate methods that return random elements from definition arrays. */ var method_names = [ + // Address + 'city_prefix', + 'city_suffix', + 'street_suffix', + // Name 'first_name', 'last_name', @@ -32,11 +37,10 @@ var method_names = [ 'bs_noun' ]; -for (var i = 0; i < method_names.length; i++) { - var method_name = method_names[i]; +method_names.forEach(function (method_name) { random[method_name] = function () { return random.array_rand(definitions[method_name]()); }; -} +}); module.exports = random; |
