benchmarks/scenarios/ember.js
function (callback /*, ...thisArg*/) {
      if (typeof callback !== 'function') {
        missingFunction(callback);
      }

      if (this.size === 0) {
        return;
      }

      var length = arguments.length;
      var map = this;
      var cb, thisArg;

      if (length === 2) {
        thisArg = arguments[1];
        cb = function (key) {
          callback.call(thisArg, map.get(key), key, map);
        };
      } else {
        cb = function (key) {
          callback(map.get(key), key, map);
        };
      }

      this._keys.forEach(cb);
    }
function (callback /*, ...thisArg*/) {
      if (typeof callback !== 'function') {
        missingFunction(callback);
      }

      if (this.size === 0) {
        return;
      }

      var length = arguments.length;
      var map = this;
      var cb, thisArg;

      if (length === 2) {
        thisArg = arguments[1];
        cb = function (key) {
          callback.call(thisArg, map.get(key), key, map);
        };
      } else {
        cb = function (key) {
          callback(map.get(key), key, map);
        };
      }

      this._keys.forEach(cb);
    }
function ( callback /*, ...thisArg*/ ) { if ( typeof callback !== 'function' ) { missingFunction ( callback ) ; } if ( this . size === 0 ) { return ; } var length = arguments . length ; var map = this ; var cb , thisArg ; if ( length === 2 ) { thisArg = arguments [ 1 ] ; cb = function ( key ) { callback . call ( thisArg , map . get ( key ) , key , map ) ; } ; } else { cb = function ( key ) { callback ( map . get ( key ) , key , map ) ; } ; } this . _keys . forEach ( cb ) ; }
Iterate over all the keys and values. Calls the function once
for each key, passing in value, key, and the map being iterated over,
in that order.
The keys are guaranteed to be iterated over in insertion order.
@method forEach
@param {Function} callback
@param {*} self if passed, the `this` value inside the
callback. By default, `this` is the map.
@private
Iterate over all the keys and values . Calls the function once for each key passing in value key and the map being iterated over in that order . The keys are guaranteed to be iterated over in insertion order .