indexes-of.js 260 B

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