From 72ea7298cc65f9d75e3e1d93d95fccf929753d1d Mon Sep 17 00:00:00 2001 From: Marak Date: Sun, 7 Feb 2016 23:52:24 +0530 Subject: [api] [minor] Added custom type for commonFileName * Generates file name based on provided ext --- lib/system.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/system.js') diff --git a/lib/system.js b/lib/system.js index 6d7fcf11..86f3394d 100644 --- a/lib/system.js +++ b/lib/system.js @@ -14,7 +14,7 @@ function System (faker) { }; this.commonFileName = function (ext, type) { - var str = faker.fake("{{random.words}}.{{system.commonFileExt}}"); + var str = faker.random.words() + "." + (ext || faker.system.commonFileExt()); str = str.replace(/ /g, '_'); str = str.replace(/\,/g, '_'); str = str.replace(/\-/g, '_'); -- cgit v1.2.3