@pirxpilot/in-groups-of

1.1.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @pirxpilot/in-groups-of

Weekly Downloads

1

Version

1.1.2

License

MIT

Unpacked Size

1.22 kB

Total Files

4

Last publish

Collaborators

  • pirxpilot