1.1.0 • Published 9 years ago

shuffle-promise v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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