shuffle-and-split
Shuffles and split an array into groups.
Last updated 5 years ago by zellwk .
ISC · Original npm · Tarball · package.json
$ cnpm install shuffle-and-split 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.2                                ...           latest (5 years ago)

3 Versions

  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |