aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarak <[email protected]>2017-09-08 13:16:14 -0400
committerGitHub <[email protected]>2017-09-08 13:16:14 -0400
commit8ea2302b05314b84f7cfd4e90e04ea8a17dc5ecb (patch)
treee13f643a8a729b78b792be7e35ff78234a363b94 /lib
parent4adcc929c7a063e56704b24b66ca1edc63b4e02a (diff)
parentdfcc3a784b5edeca1b9140c8830590e3fca883de (diff)
downloadfaker-8ea2302b05314b84f7cfd4e90e04ea8a17dc5ecb.tar.xz
faker-8ea2302b05314b84f7cfd4e90e04ea8a17dc5ecb.zip
Merge pull request #488 from APIs-guru/master
[api] Add 'Faker.setLocale' method to solve problem with ES6 import
Diffstat (limited to 'lib')
-rw-r--r--lib/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js
index c071c3fd..58f0012e 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -146,6 +146,10 @@ function Faker (opts) {
};
+Faker.prototype.setLocale = function (locale) {
+ this.locale = locale;
+}
+
Faker.prototype.seed = function(value) {
var Random = require('./random');
this.seedValue = value;