From ba5f56cd0b1c17542e8d97c3f4bc86e4839cc9f6 Mon Sep 17 00:00:00 2001 From: Christoph Diehl Date: Fri, 7 Apr 2017 16:59:10 +0200 Subject: [PATCH] Rename random.index to random.item --- random/random.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/random/random.js b/random/random.js index 4e74887..ca6a63c 100644 --- a/random/random.js +++ b/random/random.js @@ -34,7 +34,7 @@ var random = { // Returns a float in [1, limit]. The logarithm has uniform distribution. return Math.exp(random.float() * Math.log(limit)); }, - index: function (list) { + item: function (list) { if (!(list instanceof Array || (typeof list != "string" && "length" in list))) { Utils.traceback(); throw new TypeError("random.index() received a non array type: '" + list + "'");