Shuffle lists based on Fisher-Yates shuffle algorithm


Keywords
shuffle, random, javascript, javascript-tools, lists, npm, utility
License
MIT
Install
npm install shufflr@2.0.7

Documentation

shufflr

NPM Build Status Dependencies Dev Dependencies

Shuffle lists based on Fisher-Yates shuffle algorithm

Using shufflr

To use shufflr in your project simply follow this steps:

Install shufflr:

    npm install shufflr

Import shufflr in your JavaScript code:

    var shufflr = require('shufflr');

Or:

    import { shuffle } from 'shufflr';

Use shuffle method with an array to get a copy of it shuffled:

    var shuffledArray = shufflr.shuffle(originalArray)

Or:

    var shuffledArray = shuffle(originalArray)

Develop

After cloning the repository, install the dev dependencies (shufflr does not have runtime dependencies):

    npm install

To run shufflr tests simply run:

    npm run test