artdaq_node_server  v1_00_08
 All Classes Namespaces Files Variables Pages
_baseRange.js
1 /* Built-in method references for those with the same name as other `lodash` methods. */
2 var nativeCeil = Math.ceil,
3  nativeMax = Math.max;
4 
16 function baseRange(start, end, step, fromRight) {
17  var index = -1,
18  length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
19  result = Array(length);
20 
21  while (length--) {
22  result[fromRight ? length : ++index] = start;
23  start += step;
24  }
25  return result;
26 }
27 
28 module.exports = baseRange;