Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed May 31, 2016
1 parent 785a110 commit 73288ff
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Download the package and use the `dist/fakerator.js` or the `dist/fakerator.min.
<script src="https://rawgit.com/icebob/fakerator/master/dist/fakerator.js"></script>

<script>
var fakerator = new Fakerator();
var fakerator = Fakerator();
var name = fakerator.names.name();
var user = fakerator.entity.user();
</script>
Expand All @@ -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
Expand Down Expand Up @@ -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
--------- | --------------------- | ------------------------- | --------------
Expand Down

0 comments on commit 73288ff

Please sign in to comment.