source: frontend/node_modules/underscore/amd/chunk.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 410 bytes
Line 
1define(['./_setup'], function (_setup) {
2
3 // Chunk a single array into multiple arrays, each containing `count` or fewer
4 // items.
5 function chunk(array, count) {
6 if (count == null || count < 1) return [];
7 var result = [];
8 var i = 0, length = array.length;
9 while (i < length) {
10 result.push(_setup.slice.call(array, i, i += count));
11 }
12 return result;
13 }
14
15 return chunk;
16
17});
Note: See TracBrowser for help on using the repository browser.