shuffle-and-split

1.0.2 • Public • Published

Shuffle and Split

Shuffles and split an array into groups.

var shuffleAndSplit = require('shuffle-and-split')
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
 
shuffleAndSplit(arr, 3) 
 
// result 
// [
//   [ 8, 3, 11, 2 ], 
//   [ 1, 7, 6, 10 ], 
//   [ 9, 5, 12, 4 ]
// ]

Enjoy.

Readme

Keywords

none

Package Sidebar

Install

npm i shuffle-and-split

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • zellwk