Skip to content

Mess is Fisher–Yates shuffle algorithm implementation for node.js

Notifications You must be signed in to change notification settings

bobrik/node-mess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

mess

Missing shuffle function for arrays in javascript. This is Fisher–Yates shuffle, and it's very fast.

Installation

npm install mess

Usage

var mess = require("mess");

console.log(mess([1,2,3,4,5,6,7,8,9,0]));
// output will be something like:
// [ 7, 9, 2, 0, 6, 8, 5, 3, 1, 4 ]

Why mess

Because naming modules is hard and shuffle is already taken.

Authors

About

Mess is Fisher–Yates shuffle algorithm implementation for node.js

Resources

Stars

Watchers

Forks

Packages

No packages published