433b16d2c45c95f70765a9c0c91fd0d155a9df69f8983e4b5d742d96d5a9973df556e142037ba33c2d48b20b9573fa84db2994cf30e2d60c4a68cd6612a4fd 504 B

1234567891011121314151617181920
  1. /**
  2. * The base implementation of `_.times` without support for iteratee shorthands
  3. * or max array length checks.
  4. *
  5. * @private
  6. * @param {number} n The number of times to invoke `iteratee`.
  7. * @param {Function} iteratee The function invoked per iteration.
  8. * @returns {Array} Returns the array of results.
  9. */
  10. function baseTimes(n, iteratee) {
  11. var index = -1,
  12. result = Array(n);
  13. while (++index < n) {
  14. result[index] = iteratee(index);
  15. }
  16. return result;
  17. }
  18. module.exports = baseTimes;