A tiny module that turn your array into chunks of n-size.
npm install chunk-array --save
Turn array into chunks of size n, if n is a falsy value then return original array
var chunks = require('chunk-array').chunks
var arr = [1,2,3,4,5,6]
var results = chunks(arr, 3) //[[1,2,3], [4,5,6]]
A convenient method that turn array into pairs, which equals chunks(arr, 2)
var pairs = require('chunk-array').pairs
var arr = [1,2,3,4,5,6]
var results = pairs(arr) //[[1,2], [3,4], [5,6]]
MIT