diff options
| author | Chris Cast <[email protected]> | 2013-05-10 10:32:18 -0700 |
|---|---|---|
| committer | Chris Cast <[email protected]> | 2013-05-10 10:32:18 -0700 |
| commit | cce5d927e7e847c780e828972c92113d4cb7199f (patch) | |
| tree | 0c1c239df7547a9835d4cdcbf26342619f270f5a /examples | |
| parent | 3c2c44dbe66f8006fc6da319fd63a6fb85888bd6 (diff) | |
| download | faker-cce5d927e7e847c780e828972c92113d4cb7199f.tar.xz faker-cce5d927e7e847c780e828972c92113d4cb7199f.zip | |
Add range param to lorem.sentence
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/js/Faker.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/js/Faker.js b/examples/js/Faker.js index c34922eb..3ac04b0e 100644 --- a/examples/js/Faker.js +++ b/examples/js/Faker.js @@ -17,7 +17,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************** AUTOGENERATED @ 1363758276883 *************** +/*************** AUTOGENERATED @ 1368206971573 *************** WARNING: THIS FILE WAS AUTOGENERATED BY THE FAKER BUILD SCRIPT MODIFYING THIS FILE IS FINE, BUT YOU REALLY SHOULD BE MODIFYING THE LIBRARY DIRECTLY AND REGENERATING THIS FILE USING BUILD.js!!!! @@ -239,13 +239,14 @@ Faker.Lorem.words = function (num) { return Helpers.shuffle(definitions.lorem).slice(0, num); }; -Faker.Lorem.sentence = function (wordCount) { +Faker.Lorem.sentence = function (wordCount, range) { if (typeof wordCount == 'undefined') { wordCount = 3; } + if (typeof range == 'undefined') { range = 7; } // strange issue with the node_min_test failing for captialize, please fix and add this back - //return this.words(wordCount + Helpers.randomNumber(7)).join(' ').capitalize(); + //return this.words(wordCount + Helpers.randomNumber(range)).join(' ').capitalize(); - return this.words(wordCount + Faker.random.number(7)).join(' '); + return this.words(wordCount + Faker.random.number(range)).join(' '); }; Faker.Lorem.sentences = function (sentenceCount) { |
