aboutsummaryrefslogtreecommitdiff
path: root/lib/lorem.js
diff options
context:
space:
mode:
authorMatthew Bergman <[email protected]>2013-06-11 22:21:35 -0700
committerMatthew Bergman <[email protected]>2013-06-11 22:21:35 -0700
commitdceaccf2ca2c2ff217436404c41f2bf69f7577f6 (patch)
tree6aa4fdaa1cdd24309f46bebdab923a7364b69d51 /lib/lorem.js
parent1d28802e388277a6b75efbaa1589027879df101f (diff)
parentdc8c70cb3ba5c886b8c65c887f729a7b31130390 (diff)
downloadfaker-dceaccf2ca2c2ff217436404c41f2bf69f7577f6.tar.xz
faker-dceaccf2ca2c2ff217436404c41f2bf69f7577f6.zip
Merge pull request #59 from rschmukler/this-fix
Use of this keyword can break in wrong context
Diffstat (limited to 'lib/lorem.js')
-rw-r--r--lib/lorem.js8
1 files changed, 4 insertions, 4 deletions
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");
}