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;