From 73288ffd3ce025ba2b59dfba8980a17fb0bde7b1 Mon Sep 17 00:00:00 2001 From: Icebob Date: Tue, 31 May 2016 09:19:08 +0200 Subject: [PATCH] Update README.md --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b9a071f..84c77b2b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Download the package and use the `dist/fakerator.js` or the `dist/fakerator.min. @@ -53,6 +53,22 @@ var name = fakerator.names.name(); // Result: 'Dr. Marcus Drechsler' ``` +Shortly +```js +var fakerator = require("fakerator")("hu-HU"); +var name = fakerator.names.name(); +// Result: 'Fülöp Magdolna' +``` + +Or load a specific locale + +```js +var fakerator = require("fakerator/locales/de-DE")(); +var name = fakerator.names.name(); +// Result: 'Dr. Marcus Drechsler' +``` + + ## Seeding The library uses the [Mersenne Twister](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html) random number generator, so you can set seed value. ```js @@ -106,6 +122,16 @@ The library supports localizations. You can set the locale code in constructor. // Альберт Валентинович Архипов ``` +In production, you can load only a specific locale: + +```js + // Use french + var fakeratorFR = require("fakerator/locales/fr-FR")(); + console.log(fakeratorFR.names.name()); + // Dufour Camille +``` + + ### Available localizations: Code | Language/Country | Usage | Creator/Source --------- | --------------------- | ------------------------- | --------------