aboutsummaryrefslogtreecommitdiff
path: root/lib/lorem.js
diff options
context:
space:
mode:
authorMarak Squires <[email protected]>2011-12-28 03:45:01 -0800
committerMarak Squires <[email protected]>2011-12-28 03:45:01 -0800
commit3ee94bb7ec0fbfe46c1bffac2e0658d103e03e4f (patch)
tree535f415dc893e2a0bed430ce45bab4c9bb28e25b /lib/lorem.js
parentaf47db9be83e285d0728447dbd8d8813cf58fd72 (diff)
parent84ab59342f333bc33a992ec5ca37d8716295a536 (diff)
downloadfaker-3ee94bb7ec0fbfe46c1bffac2e0658d103e03e4f.tar.xz
faker-3ee94bb7ec0fbfe46c1bffac2e0658d103e03e4f.zip
Merge pull request #14 from aratak/trailing_spaces
[dist] Code cleanup
Diffstat (limited to 'lib/lorem.js')
-rw-r--r--lib/lorem.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/lorem.js b/lib/lorem.js
index 3d05535c..8a408ec2 100644
--- a/lib/lorem.js
+++ b/lib/lorem.js
@@ -2,15 +2,15 @@ var Helpers = require('./helpers');
var definitions = require('../lib/definitions');
exports.words = function(num){
- if( typeof num == 'undefined'){ var num = 3;}
+ if( typeof num == 'undefined'){ var num = 3;}
return Helpers.shuffle(definitions.lorem()).slice(0, num);
//Words.shuffle[0, num]
};
exports.sentence = function(wordCount){
- if( typeof wordCount == 'undefined'){ var wordCount = 3;}
+ if( typeof wordCount == 'undefined'){ var wordCount = 3;}
- // strange issue with the node_min_test failing for captialize, please fix and add this back
+ // 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(7)).join(' ');
@@ -18,23 +18,23 @@ exports.sentence = function(wordCount){
exports.sentences = function(sentenceCount){
if( typeof sentenceCount == 'undefined'){ var sentenceCount = 3;}
- var sentences = [];
- for(sentenceCount; sentenceCount >= 0; sentenceCount--){
- sentences.push(this.sentence());
- }
+ var sentences = [];
+ for(sentenceCount; sentenceCount >= 0; sentenceCount--){
+ sentences.push(this.sentence());
+ }
return sentences.join("\n");
};
exports.paragraph = function(sentenceCount){
if( typeof sentenceCount == 'undefined'){ var sentenceCount = 3;}
- return this.sentences(sentenceCount + Helpers.randomNumber(3));
+ return this.sentences(sentenceCount + Helpers.randomNumber(3));
};
exports.paragraphs = function(paragraphCount){
if( typeof paragraphCount == 'undefined'){ var paragraphCount = 3;}
- var paragraphs = [];
- for(paragraphCount; paragraphCount >= 0; paragraphCount--){
- paragraphs.push(this.paragraph());
- }
+ var paragraphs = [];
+ for(paragraphCount; paragraphCount >= 0; paragraphCount--){
+ paragraphs.push(this.paragraph());
+ }
return paragraphs.join("\n \r\t");
};