From dfcc3a784b5edeca1b9140c8830590e3fca883de Mon Sep 17 00:00:00 2001 From: Ivan Goncharov Date: Wed, 8 Mar 2017 12:50:20 +0200 Subject: Add 'setLocale' method to solve problem with ES6 import --- lib/index.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/index.js b/lib/index.js index 17f93bfc..45d8dcb3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -142,6 +142,10 @@ function Faker (opts) { }; +Faker.prototype.setLocale = function (locale) { + this.locale = locale; +} + Faker.prototype.seed = function(value) { var Random = require('./random'); this.seedValue = value; -- cgit v1.2.3