diff options
| author | Marak Squires <[email protected]> | 2010-05-16 19:26:30 -0400 |
|---|---|---|
| committer | Marak Squires <[email protected]> | 2010-05-16 19:26:30 -0400 |
| commit | b18c0f665cfc5a2d6e088246a4e2c4f811847e8a (patch) | |
| tree | 90123184aa2686dac1dd0718d278689962f1a20f /Faker.js | |
| parent | 8a9eeab7270b33bb0ed0ae4a82af3f30494a8433 (diff) | |
| download | faker-b18c0f665cfc5a2d6e088246a4e2c4f811847e8a.tar.xz faker-b18c0f665cfc5a2d6e088246a4e2c4f811847e8a.zip | |
you gotta run the BUILD script matching patches to the lib guys
Diffstat (limited to 'Faker.js')
| -rw-r--r-- | Faker.js | 23 |
1 files changed, 16 insertions, 7 deletions
@@ -1,4 +1,4 @@ -/*************** AUTOGENERATED @ 1273996437180 *************** +/*************** AUTOGENERATED @ 1274052374977 *************** 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!!!! @@ -186,13 +186,13 @@ Faker.Lorem.sentence = function (wordCount){ return this.words(wordCount + Helpers.randomNumber(7)).join(' '); }; -Faker.Lorem.sentences = function (paragraphCount){ - if( typeof paragraphCount == 'undefined'){ var paragraphCount = 3;} - var paragraphs = []; - for(paragraphCount; paragraphCount >= 0; paragraphCount--){ - paragraphs.push(this.sentence()); +Faker.Lorem.sentences = function (sentenceCount){ + if( typeof sentenceCount == 'undefined'){ var sentenceCount = 3;} + var sentences = []; + for(sentenceCount; sentenceCount >= 0; sentenceCount--){ + sentences.push(this.sentence()); } - return paragraphs.join("\n \r\t"); + return sentences.join("\n"); }; Faker.Lorem.paragraph = function (sentenceCount){ @@ -200,6 +200,15 @@ Faker.Lorem.paragraph = function (sentenceCount){ return this.sentences(sentenceCount + Helpers.randomNumber(3)); }; +Faker.Lorem.paragraphs = function (paragraphCount){ + if( typeof paragraphCount == 'undefined'){ var paragraphCount = 3;} + var paragraphs = []; + for(paragraphCount; paragraphCount >= 0; paragraphCount--){ + paragraphs.push(this.paragraph()); + } + return paragraphs.join("\n \r\t"); +}; + Faker.Helpers = {}; Faker.Helpers.randomNumber = function (range) { r = Math.floor(Math.random()*range); |
