From 3439e70eb15dc737cd310d897f1b12487bdb34bf Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Sat, 15 Jan 2022 21:37:07 +0900 Subject: [PATCH] Update rand.js --- lib/rand.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rand.js b/lib/rand.js index 7eec987..60a749c 100644 --- a/lib/rand.js +++ b/lib/rand.js @@ -1,4 +1,4 @@ -// Ramdom +// rand.js function randomize() { return Math.random(); @@ -53,7 +53,7 @@ function uuidv4() { }); } -function shffle(arr) { +function shuffle(arr) { return arr.sort(function() { return randomize() - 0.5; }); @@ -64,7 +64,7 @@ exports.getInt = getInt; exports.one = one; exports.makeString = makeString; exports.uuidv4 = uuidv4; -exports.shffle = shffle; +exports.shuffle = shuffle; exports.VERSIONINFO = "Random Module (random.js) version 0.2"; exports.global = global;