forked from zuriby/Faker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[api] [fix] user-agent randomness #521
* Now using `faker.random.number` * Adds faker seed and mersenne
- Loading branch information
Showing
1 changed file
with
6 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ The license for that script is as follows: | |
<[email protected]> wrote this file. As long as you retain this notice you can do whatever you want with this stuff. | ||
If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Luka Pusic | ||
*/ | ||
|
||
function rnd(a, b) { | ||
|
@@ -33,6 +34,11 @@ function rnd(a, b) { | |
b = b || 100; | ||
|
||
if (typeof b === 'number' && typeof a === 'number') { | ||
|
||
// 9/2018 - Added faker random to ensure mersenne and seed | ||
var faker = require('../'); | ||
return faker.random.number({ min: a, max: b}); | ||
|
||
//rnd(int min, int max) returns integer between min, max | ||
return (function (min, max) { | ||
if (min > max) { | ||
|