diff options
| author | Marak <[email protected]> | 2015-07-08 23:56:22 -0700 |
|---|---|---|
| committer | Marak <[email protected]> | 2015-07-08 23:56:22 -0700 |
| commit | 4c1b454b8e3c8d87f2569a2ce0d7730dc31ee821 (patch) | |
| tree | 6fcbdb8eee0a7365c78043008c8dd5b6a51d39c5 /lib/hacker.js | |
| parent | edb7d482a40e98ce25cd6ba296818be14f291aa1 (diff) | |
| download | faker-4c1b454b8e3c8d87f2569a2ce0d7730dc31ee821.tar.xz faker-4c1b454b8e3c8d87f2569a2ce0d7730dc31ee821.zip | |
[api] [refactor] Rename `array_element` and `object_element` to camelCase. Set default max random number to 99999. Added default arguments to some methods.
Diffstat (limited to 'lib/hacker.js')
| -rw-r--r-- | lib/hacker.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/hacker.js b/lib/hacker.js index 7aba150e..463f8331 100644 --- a/lib/hacker.js +++ b/lib/hacker.js @@ -2,23 +2,23 @@ var Hacker = function (faker) { var self = this; self.abbreviation = function () { - return faker.random.array_element(faker.definitions.hacker.abbreviation); + return faker.random.arrayElement(faker.definitions.hacker.abbreviation); }; self.adjective = function () { - return faker.random.array_element(faker.definitions.hacker.adjective); + return faker.random.arrayElement(faker.definitions.hacker.adjective); }; self.noun = function () { - return faker.random.array_element(faker.definitions.hacker.noun); + return faker.random.arrayElement(faker.definitions.hacker.noun); }; self.verb = function () { - return faker.random.array_element(faker.definitions.hacker.verb); + return faker.random.arrayElement(faker.definitions.hacker.verb); }; self.ingverb = function () { - return faker.random.array_element(faker.definitions.hacker.ingverb); + return faker.random.arrayElement(faker.definitions.hacker.ingverb); }; self.phrase = function () { @@ -31,7 +31,7 @@ var Hacker = function (faker) { verb: self.verb() }; - var phrase = faker.random.array_element([ "If we {{verb}} the {{noun}}, we can get to the {{abbreviation}} {{noun}} through the {{adjective}} {{abbreviation}} {{noun}}!", + var phrase = faker.random.arrayElement([ "If we {{verb}} the {{noun}}, we can get to the {{abbreviation}} {{noun}} through the {{adjective}} {{abbreviation}} {{noun}}!", "We need to {{verb}} the {{adjective}} {{abbreviation}} {{noun}}!", "Try to {{verb}} the {{abbreviation}} {{noun}}, maybe it will {{verb}} the {{adjective}} {{noun}}!", "You can't {{verb}} the {{noun}} without {{ingverb}} the {{adjective}} {{abbreviation}} {{noun}}!", |
