diff options
| author | Marak <[email protected]> | 2016-02-07 23:52:24 +0530 |
|---|---|---|
| committer | Marak <[email protected]> | 2016-02-07 23:52:24 +0530 |
| commit | 72ea7298cc65f9d75e3e1d93d95fccf929753d1d (patch) | |
| tree | d02b9a555880c89606f949c073c629e558fa6913 /lib | |
| parent | 5faff98b55a6b3e51862dd3c79c5c0336bcd1953 (diff) | |
| download | faker-72ea7298cc65f9d75e3e1d93d95fccf929753d1d.tar.xz faker-72ea7298cc65f9d75e3e1d93d95fccf929753d1d.zip | |
[api] [minor] Added custom type for commonFileName
* Generates file name based on provided ext
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/system.js | 2 |
1 files changed, 1 insertions, 1 deletions
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, '_'); |
