aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarak <[email protected]>2018-09-22 21:44:56 -0400
committerMarak <[email protected]>2018-09-22 21:44:56 -0400
commit590f03e933eaeb45726d24f025952d70a1df291f (patch)
tree6a248bed1bfe3f1eeaecbc9735714dd6c59dac55
parentfacdb927e0c8e4aeef2d3f16c28808010fac14cf (diff)
downloadfaker-590f03e933eaeb45726d24f025952d70a1df291f.tar.xz
faker-590f03e933eaeb45726d24f025952d70a1df291f.zip
[api] [fix] user-agent randomness #521
* Now using `faker.random.number` * Adds faker seed and mersenne
-rw-r--r--vendor/user-agent.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/user-agent.js b/vendor/user-agent.js
index ee449bc7..f7ef0fed 100644
--- a/vendor/user-agent.js
+++ b/vendor/user-agent.js
@@ -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) {