aboutsummaryrefslogtreecommitdiff
path: root/lib/lorem.js
diff options
context:
space:
mode:
authorJakub Mandula <[email protected]>2017-02-26 13:51:40 +0000
committerJakub Mandula <[email protected]>2017-02-26 13:51:40 +0000
commit232a2a58d70935c57d311b5ba237347f703c2131 (patch)
tree69f695e62e17386988c47f8522bf5e14db193839 /lib/lorem.js
parentd6c20353360ef1eefb56128eeb50ece4f5845372 (diff)
parentf379057be0112d6732b056d93d1380be18e1087a (diff)
downloadfaker-232a2a58d70935c57d311b5ba237347f703c2131.tar.xz
faker-232a2a58d70935c57d311b5ba237347f703c2131.zip
Merge branch 'Mark/origin' into creditCard
Diffstat (limited to 'lib/lorem.js')
-rw-r--r--lib/lorem.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/lorem.js b/lib/lorem.js
index 46b5ae22..db6aec72 100644
--- a/lib/lorem.js
+++ b/lib/lorem.js
@@ -51,6 +51,17 @@ var Lorem = function (faker) {
};
/**
+ * slug
+ *
+ * @method faker.lorem.slug
+ * @param {number} wordCount number of words, defaults to 3
+ */
+ self.slug = function (wordCount) {
+ var words = faker.lorem.words(wordCount);
+ return Helpers.slugify(words);
+ };
+
+ /**
* sentences
*
* @method faker.lorem.sentences
@@ -83,7 +94,7 @@ var Lorem = function (faker) {
*
* @method faker.lorem.paragraphs
* @param {number} paragraphCount defaults to 3
- * @param {string} separatora defaults to `'\n \r'`
+ * @param {string} separator defaults to `'\n \r'`
*/
self.paragraphs = function (paragraphCount, separator) {
if (typeof separator === "undefined") {