jashkenas/underscore — pull request #1206 by kevinmarx (2013-07-15 02:29:35+00:00)
Title: _.chunk method for arrays

A method for splitting a target array into a 2 dimensional array of a specified length. If there are remaining elements they are added as the last element in the new array. An example use case would be in chunking and array of object ids for use in url query params as to not hit the url character limit.

Example:
`_.chunk([1, 2, 3, 4], 3)` would return `[[1, 2, 3], [4]]`