source: node_modules/ramda/src/internal/_aperture.js

main
Last change on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 280 bytes
RevLine 
[d24f17c]1function _aperture(n, list) {
2 var idx = 0;
3 var limit = list.length - (n - 1);
4 var acc = new Array(limit >= 0 ? limit : 0);
5
6 while (idx < limit) {
7 acc[idx] = Array.prototype.slice.call(list, idx, idx + n);
8 idx += 1;
9 }
10
11 return acc;
12}
13
14module.exports = _aperture;
Note: See TracBrowser for help on using the repository browser.