millermedeiros / amd-utils

modular JavaScript utilities written in the AMD format
http://millermedeiros.github.com/amd-utils
142 stars 11 forks source link

Add array/split to split array into segments #72

Closed conradz closed 12 years ago

conradz commented 12 years ago

I added the array/split method to split an array into segments. The use case for this that I had was splitting an array of data into two columns to feed to a template. This can split the array into any number of segments, will preserve the original order, and will make the first segments one item longer if it is an uneven split.

millermedeiros commented 12 years ago

nice! that is indeed useful.