@pirxpilot/in-groups-of
Return an array of arrays in groups of N
Last updated 2 years ago by pirxpilot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @pirxpilot/in-groups-of 
SYNC missed versions from official npm registry.

in-groups-of

Return an array of arrays in groups of N

Installation

$ npm install @pirxpilot/in-groups-of

Example

var nums = [1,2,3,4,5,6,7,8,9,10];

inGroupsOf(nums, 5)
// => [[1,2,3,4,5], [6,7,8,9,10]]

inGroupsOf(nums, 4)
// => [[1,2,3,4], [5,6,7,8], [9,10]]

inGroupsOf(nums, 2)
//=> [[1,2], [3,4], [5,6], [7,8], [9,10]]

License

MIT

Current Tags

  • 1.1.2                                ...           latest (2 years ago)

2 Versions

  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2014 - 2017 © taobao.org |