Skip to content

Commit

Permalink
[api] [fix] user-agent randomness #521
Browse files Browse the repository at this point in the history
  * Now using `faker.random.number`
  * Adds faker seed and mersenne
  • Loading branch information
Marak committed Sep 23, 2018
1 parent facdb92 commit 590f03e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vendor/user-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 590f03e

Please sign in to comment.