map-iterate.js 269 B

12345678
  1. 'use strict';
  2. var iterateSimple = require('../internals/iterate-simple');
  3. module.exports = function (map, fn, interruptible) {
  4. return interruptible ? iterateSimple(map.entries(), function (entry) {
  5. return fn(entry[1], entry[0]);
  6. }, true) : map.forEach(fn);
  7. };