Sha256: 134600a369e098c5f6a5892d2020ce6ad7c51da158b4fec85b80926edee48372

Contents?: true

Size: 850 Bytes

Versions: 276

Compression:

Stored size: 850 Bytes

Contents

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
    nativeMax = Math.max;

/**
 * The base implementation of `_.range` and `_.rangeRight` which doesn't
 * coerce arguments.
 *
 * @private
 * @param {number} start The start of the range.
 * @param {number} end The end of the range.
 * @param {number} step The value to increment or decrement by.
 * @param {boolean} [fromRight] Specify iterating from right to left.
 * @returns {Array} Returns the range of numbers.
 */
function baseRange(start, end, step, fromRight) {
  var index = -1,
      length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
      result = Array(length);

  while (length--) {
    result[fromRight ? length : ++index] = start;
    start += step;
  }
  return result;
}

module.exports = baseRange;

Version data entries

276 entries across 274 versions & 31 rubygems

Version Path
sumomo-0.8.16 data/sumomo/api_modules/node_modules/lodash/_baseRange.js
disco_app-0.18.0 test/dummy/node_modules/lodash/_baseRange.js
disco_app-0.18.2 test/dummy/node_modules/lodash/_baseRange.js
sumomo-0.8.15 data/sumomo/api_modules/node_modules/lodash/_baseRange.js
trusty-cms-5.0.7 node_modules/lodash/_baseRange.js
appmap-0.72.2 ./node_modules/lodash/_baseRange.js
trusty-cms-5.0.6 node_modules/lodash/_baseRange.js
appmap-0.72.1 ./node_modules/lodash/_baseRange.js
appmap-0.72.0 ./node_modules/lodash/_baseRange.js
trusty-cms-5.0.5 node_modules/lodash/_baseRange.js
trusty-cms-5.0.4 node_modules/lodash/_baseRange.js
appmap-0.71.0 ./node_modules/lodash/_baseRange.js
disco_app-0.16.1 test/dummy/node_modules/lodash/_baseRange.js
appmap-0.70.2 ./node_modules/lodash/_baseRange.js
sumomo-0.8.14 data/sumomo/api_modules/node_modules/lodash/_baseRange.js
appmap-0.70.1 ./node_modules/lodash/_baseRange.js
appmap-0.70.0 ./node_modules/lodash/_baseRange.js
appmap-0.69.0 ./node_modules/lodash/_baseRange.js
sumomo-0.8.13 data/sumomo/api_modules/node_modules/lodash/_baseRange.js
appmap-0.68.2 ./node_modules/lodash/_baseRange.js