shuffle-promise

1.1.0 • Public • Published

shuffle-promise

Simple array randomization with a promise.

Build Status

Install

$ npm install --save shuffle-promise

Usage

var shufflePromise = require('shuffle-promise');
var srcArray = [1, 2, 'Foo', {bar: 1}];
 
shufflePromise(srcArray)
    .then(function(shuffledArray) {
        // ['Foo', 2, {bar: 1}, 1] Yay!
    })
    .catch(function(error) {
        // Catch errors
    });

License

MIT © Dorian Camilleri

Package Sidebar

Install

npm i shuffle-promise

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • dcamilleri