From b18c0f665cfc5a2d6e088246a4e2c4f811847e8a Mon Sep 17 00:00:00 2001 From: Marak Squires Date: Sun, 16 May 2010 19:26:30 -0400 Subject: you gotta run the BUILD script matching patches to the lib guys --- Faker.js | 23 ++++++++++++++++------- Readme.md | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Faker.js b/Faker.js index 3a777495..135ad6a7 100644 --- a/Faker.js +++ b/Faker.js @@ -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); diff --git a/Readme.md b/Readme.md index c2f00211..07a85ad2 100644 --- a/Readme.md +++ b/Readme.md @@ -17,7 +17,7 @@ var randomCard = Faker.Helpers.createCard(); // random contact card containing many properties ## API - + ## Authors ####Matthew Bergman & Marak Squires Heavily inspired by Benjamin Curtis's Ruby Gem [Faker](http://faker.rubyforge.org/) and Perl's [Data::Faker](http://search.cpan.org/~jasonk/Data-Faker-0.07/lib/Data/Faker.pm) \ No newline at end of file -- cgit v1.2.3