Skip to content

Lesha-spr/shuffle-iterable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shuffle-iterable

Shuffles any iterable data. Returns new data (doesn't modify original). Supported types: Array, Object, String .

Update: temporarily removed es6 types support.

Usage

npm install shuffle-iterable
var shuffle = require('shuffle-iterable');

var obj = {a: 5, b: 10, c: 15};
shuffle(obj); // new object randomly shuffled by obj keys;

var arr = [3, 5, 9];
shuffle(arr);

var str = 'abc';
shuffle(str);

About

Shuffles iterable

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published