23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
769302
function forEach(callbackfn /*, that = undefined */) {
                                anInstance(this, C, 'forEach');
                                var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3)
                                    , entry;
                                while (entry = entry ? entry.n : this._f) {
                                    f(entry.v, entry.k, this);
                                    // revert to the last existing entry
                                    while (entry && entry.r) entry = entry.p;
                                }
                            }
175692
function (object, callback) {
                var list;
                if (object instanceof List) {
                    list = object;
                } else if (object instanceof Array) {
                    list = new List(object);
                } else {
                    list = new List([object]);
                }

                if (list.size()) {
                    var element = list.at(0);
                    var objectType = this.getObjectTypeIdForElement(element);
                    if (!objectType) {
                        callback("Couldn't find label object type for " + element.prototype.constructor.name);
                        return;
                    }
                    var query = new Query().in("objectIds", list.toArray(function (object) {
                        return object && object.identifier();
                    })).in('objectTypeId', [objectType]);


                    var labels = this.$.dataSource.createCollection(Collection.of(Label)).query(query);

                    labels.fetch({fullData: true}, callback);
                } else {
                    callback && callback();
                }
            }
818125
function forEach(nodes, fn) {
  if (nodes && nodes.length) {
    Array.prototype.slice.call(nodes).forEach(fn);
  }
}
498043
function (callback) {
                var result = new Array(this.length), boundCallback = _gpfArrayBind(callback, arguments);
                _gpfArrayForEachOwn(this, function (item, index, array) {
                    result[index] = boundCallback(item, index, array);
                });
                return result;
            }
381473
function (thisArg) {
                var me = this, prependArgs = _gpfArrayTail(arguments), length = Math.max(this.length - prependArgs.length, _GPF_COMPATIBILITY_FUNCTION_MIN_LENGTH), builderSource = _generateBindBuilderSource(length);
                return _gpfFunc([
                    "thisArg",
                    "prependArgs",
                    "_gpfArraySlice"
                ], builderSource).call(me, thisArg, prependArgs, _gpfArraySlice);
            }
1185388
function (property, callback) {
        // if only one arg we count the collection
        if ([].slice.call(arguments).length === 1) {
            callback = property 
            property = 'key'
        } 
        var c = 0 
        this.each(function(e){
            if (e[property]) c++
        })
        this.fn('count', callback).call(this, c)
    }
867937
function( object, callback, args ) {
		var name, i = 0, length = object.length;

		if ( args ) {
			if ( length === undefined ) {
				for ( name in object )
					if ( callback.apply( object[ name ], args ) === false )
						break;
			} else
				for ( ; i < length; )
					if ( callback.apply( object[ i++ ], args ) === false )
						break;

		// A special, fast, case for the most common use of each
		} else {
			if ( length === undefined ) {
				for ( name in object )
					if ( callback.call( object[ name ], name, object[ name ] ) === false )
						break;
			} else
				for ( var value = object[0];
					i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
		}

		return object;
	}
1152762
function define () {
  var args = Array.prototype.slice.call(arguments)
  var i, l

  var name = args.shift()
  if (is.array(name)) {
    name = args.shift()
    for (i = 0, l = name.length; i < l; i++) {
      define.apply(this, [name[i]].concat(args))
    }
    return this
  }

  if (!is.string(name)) throw new Error('Method name is not defined')

  var invoke = is.function(args[args.length - 1]) ? wrapFn(args.pop()) : null
  var pre = args.map(wrapFn)

  // define scope method
  this[name] = function () {
    var args = Array.prototype.slice.call(arguments)
    var self = this
    var callback

    if (is.function(args[args.length - 1])) callback = args.pop()

    // init pipeline
    var pipe = []
    var obj = this

    // prototype chain
    while (obj) {
      if (obj.hasOwnProperty('_hooks') && obj._hooks[name]) {
        pipe.unshift(obj._hooks[name])
      }
      obj = Object.getPrototypeOf(obj)
    }
    // pre middlewares
    pipe.unshift(pre)

    // invoke middleware
    if (invoke) pipe.push(invoke)

    pipe = flatten(pipe)

    // context object and next triggerer
    var ctx = new EventEmitter()
    ctx.method = name
    ctx.args = args
    var index = 0
    var size = pipe.length

    function next (err, res) {
      if (err || index === size) {
        var args = Array.prototype.slice.call(arguments)
        // callback when err or end of pipeline
        if (callback) callback.apply(self, args)
        args.unshift('end')
        ctx.emit.apply(ctx, args)
      } else if (index < size) {
        var fn = pipe[index]
        index++
        var val = fn.call(self, ctx, next)
        if (is.promise(val)) {
          val.then(function (res) {
            next(null, res)
          }, function (err) {
            next(err || new Error())
          })
        } else if (fn.length < 2) {
          // args without next() & not promise, sync func
          next(null, val)
        }
      }
    }

    if (callback) {
      next()
    } else {
      // use promise if no callback
      return new Promise(function (resolve, reject) {
        callback = function (err, result) {
          if (err) return reject(err)
          resolve(result)
        }
        next()
      })
    }
  }
  return this
}
261580
function each (iterable, fn) {
        var len
            , i = 0
            , iter
            , item
            , ret
        ;

        if (!iterable) throw genTypeError($invalidArgument);

        var gen = iterable[Symbol[$iterator]];
        if (isFunction(gen))
            iter = gen.call(iterable);
        else if (isFunction(iterable.next)) {
            iter = iterable;
        }
        else if (isInstanceOf(iterable, Arr)) {
            len = iterable.length;
            while (i < len) {
                fn(iterable[i], i++);
            }
            return i;
        } else
            throw genTypeError($invalidArgument);

        while (!(item = iter.next()).done) {
            ret = genTryCatcher(fn)(item.value, i++);
            if (ret === $tryErr) {
                isFunction(iter[$return]) && iter[$return]();
                throw ret.e;
            }
        }

        return i;
    }
1320633
function (object, callback, thisArg) {
        var result;
        callback = sofa.Util.createCallback(callback, thisArg);
        sofa.Util.forOwn(object, function (value, key, object) {
            if (callback(value, key, object)) {
                result = key;
                return false;
            }
        });
        return result;
    }
395028
function(keyname) {
  const _ = Struct.PriProp(keyname);
  if (_.__proto__) {
    _.__proto__ = Struct.prototype;
  }
  else {
    Object.keys(Struct.prototype).forEach(function(p) {
      Object.defineProperty(_, p, {
        value    : Struct.prototype[p],
        writable : false
      });
    }, this);
  }
  var classFunction;
  Object.defineProperties(_, {
    requires : {
      value: {},
      writable: false
    },

    defaults : {
      value: {},
      writable: false
    },

    defaultFuncs : {
      value: {},
      writable: false
    },

    views: {
      value: {},
      writable: false
    },

    parentProps: {
      value: [],
      writable: false
    },

    enumerableDescs: {
      value: {},
      writable: false
    },

    classFunction : {
      get: function() {
        return classFunction;
      },
      set: function(v) {
        if (classFunction === undefined) {
          classFunction = v;
        }
        else if (classFunction !== v) {
          throw new Error('cannot change classFunction.');
        }
      }
    },

    Modifiers : {
      value    : Struct.Modifiers,
      writable : false
    }
  });
  return _;
}
324449
function each(collection, callback, scope) {
		if ("[object Object]" === Object.prototype.toString.call(collection)) {
			for (var d in collection) {
				if (Object.prototype.hasOwnProperty.call(collection, d)) {
					callback.call(scope, d, collection[d]);
				}
			}
		} else {
			for (var e = 0, f = collection.length; e < f; e++) {
				callback.call(scope, e, collection[e]);
			}
		}
	}
1208625
function forEach(iterable, callback) {
    for (var i = 0; i < iterable.length; i++) {
        callback(iterable[i], i);
    }
}
286040
function (fn) {
        if(validateFn(fn)){
            this.list.push(fn);
        }else if(Object.prototype.toString.call(fn) === "[object Array]"){
            for(var i = 0, len = fn.length; i < len; i++){
                 arguments.callee.call(this, fn[i]);   
            }
        }

        return this;
    }
224684
function (functionName, arguments) {
                var self = this;
                var args = self._getArgs(arguments);
                var callback = self._getCallback(arguments);

                return self._generic(functionName, args)
                    .nodeify(callback);
            }
1371403
function(collection, fn) {
        if ( Array.isArray(collection) ) {
          var result = [];

          for (var i = 0; i < collection.length; i++) {
            result[i] = fn(collection[i], i, collection);
          }

          return result;
        }
        else if ( Object.prototype.toString.call(collection) === '[object Object]' ) {
          var result = {};

          for (var key in collection) {
            if ( collection.hasOwnProperty(key) ) {
              result[key] = fn(collection[key]);
            }
          }

          return result;
        }
        else throw new TypeError('Invalid type. First argument must be an array or an object.');
      }
179875
function each(collection, callback) {
        if (utils.isNode(collection) || collection === window || collection === document) {
            collection = [collection];
        }
        if (!utils.isArrayLike(collection) && !utils.isObject(collection)) {
            collection = [collection];
        }
        if (utils.size(collection) == 0) {
            return;
        }

        if (utils.isArrayLike(collection) && !utils.isObject(collection)) {
            var l = collection.length,
                i = 0;
            for (; i < l; i++) {
                if (callback.call(collection[i], collection[i], i, collection) === false) {
                    break;
                }
            }
        } else if (utils.isObject(collection)) {
            for (var key in collection) {
                if (utils.has(collection, key)) {
                    if (callback.call(collection[key], collection[key], key, collection) === false) {
                        break;
                    }
                }
            }
        }
    }