From 9869c32457598410c986178e6922713d438bd7c9 Mon Sep 17 00:00:00 2001 From: pyoor Date: Tue, 25 Apr 2017 11:18:29 -0400 Subject: [PATCH] Rename make.numbers.number to make.numbers.any --- lib/make/fonts.js | 2 +- lib/make/network.js | 8 ++++---- lib/make/numbers.js | 4 ++-- lib/make/units.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/make/fonts.js b/lib/make/fonts.js index 4413998..a8e4bb8 100644 --- a/lib/make/fonts.js +++ b/lib/make/fonts.js @@ -59,7 +59,7 @@ make.font = { s += random.pick(make.font.weight) + " "; } if (random.chance(4)) { - s += make.numbers.number() + "/"; + s += make.numbers.any() + "/"; } s += make.font.size(); s += " "; diff --git a/lib/make/network.js b/lib/make/network.js index 2882e9a..11be36e 100644 --- a/lib/make/network.js +++ b/lib/make/network.js @@ -42,10 +42,10 @@ make.network = { return ["turn", "turns", "stun", "stuns"]; }, randomIPv4: function () { - return random.pick([random.number(255), make.numbers.number]) + "." + - random.pick([random.number(255), make.numbers.number]) + "." + - random.pick([random.number(255), make.numbers.number]) + "." + - random.pick([random.number(255), make.numbers.number]); + return random.pick([random.number(255), make.numbers.any]) + "." + + random.pick([random.number(255), make.numbers.any]) + "." + + random.pick([random.number(255), make.numbers.any]) + "." + + random.pick([random.number(255), make.numbers.any]); }, randomIPv6: function () { return "[" + make.strings.stringFromBlocks([":", function () { diff --git a/lib/make/numbers.js b/lib/make/numbers.js index 4aa64c5..2b150af 100644 --- a/lib/make/numbers.js +++ b/lib/make/numbers.js @@ -39,14 +39,14 @@ make.numbers = { }, unsignedNumber: function () { if (random.chance(2)) { - return Math.abs(make.numbers.number()); + return Math.abs(make.numbers.any()); } return Math.pow(2, random.number(65)) + random.number(3) - 1; }, evenNumber: function (number) { return number % 2 === 1 ? ++number : number; }, - number: function () { + anynumber: function () { let value = random.choose([ [10, make.numbers.float], [10, [make.numbers.rangeNumber, make.numbers.tinyNumber]], diff --git a/lib/make/units.js b/lib/make/units.js index 3933c2c..2589bfa 100644 --- a/lib/make/units.js +++ b/lib/make/units.js @@ -9,9 +9,9 @@ make.unit = { ]); }, length: function () { - return make.numbers.number() + make.unit.units(); + return make.numbers.any() + make.unit.units(); }, percent: function () { - return make.numbers.number() + "%"; + return make.numbers.any() + "%"; }, };