From dc8c70cb3ba5c886b8c65c887f729a7b31130390 Mon Sep 17 00:00:00 2001 From: Ryan Schmukler Date: Wed, 5 Jun 2013 18:17:08 -0500 Subject: Switched from this to var name to avoid context issues --- lib/lorem.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/lorem.js') diff --git a/lib/lorem.js b/lib/lorem.js index 7010fca9..baa18ebc 100644 --- a/lib/lorem.js +++ b/lib/lorem.js @@ -14,28 +14,28 @@ var lorem = { // 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 + Faker.random.number(7)).join(' '); + return lorem.words(wordCount + Faker.random.number(7)).join(' '); }, sentences: function (sentenceCount) { if (typeof sentenceCount == 'undefined') { sentenceCount = 3; } var sentences = []; for (sentenceCount; sentenceCount > 0; sentenceCount--) { - sentences.push(this.sentence()); + sentences.push(lorem.sentence()); } return sentences.join("\n"); }, paragraph: function (sentenceCount) { if (typeof sentenceCount == 'undefined') { sentenceCount = 3; } - return this.sentences(sentenceCount + Faker.random.number(3)); + return lorem.sentences(sentenceCount + Faker.random.number(3)); }, paragraphs: function (paragraphCount) { if (typeof paragraphCount == 'undefined') { paragraphCount = 3; } var paragraphs = []; for (paragraphCount; paragraphCount > 0; paragraphCount--) { - paragraphs.push(this.paragraph()); + paragraphs.push(lorem.paragraph()); } return paragraphs.join("\n \r\t"); } -- cgit v1.2.3