all files / lib/locales/default/lorem/ index.js

100% Statements 11/11
100% Branches 0/0
100% Functions 2/2
100% Lines 11/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25         28×   28× 28× 180×   28×         25×        
module.exports = {
	word: require("./word"),
	supplemental: require("./supplemental"),
 
	sentence() {
		let wordCount = this.random.number(3, 10);
 
		let words = [];
		for(wordCount; wordCount > 0; wordCount--)
			words.push(this.lorem.word());
 
		return this.capitalize(words.join(" ")) + ".";
	},
 
	paragraph() {
		let sentenceCount = this.random.number(3, 6);
 
		let sentences = [];
		for(sentenceCount; sentenceCount > 0; sentenceCount--)
			sentences.push(this.lorem.sentence());
 
		return sentences.join(" ");
	}
};