indexes-of.js 275 B

123456789101112
  1. "use strict";
  2. var indexOf = require("./e-index-of");
  3. module.exports = function (value/*, fromIndex*/) {
  4. var result = [], i, fromIndex = arguments[1];
  5. while ((i = indexOf.call(this, value, fromIndex)) !== -1) {
  6. result.push(i);
  7. fromIndex = i + 1;
  8. }
  9. return result;
  10. };