lib/altshift/core/base.js
function forEach(object, iterator, thisp) {
    if (object) {
        if (object.forEach) {
            object.forEach(iterator, thisp);
            return;
        }
        //Default implementation
        if (! (iterator instanceof Function)) {
            throw new TypeError('iterator should be a Function');
        }

        var key, length;

        if (isString(object)) {
            length = object.length;
            for (key = 0; key < length; key += 1) {
                iterator.call(thisp, object[key], key, object);
            }
            return;
        }

        for (key in object) {
            if (object.hasOwnProperty(key)) {
                iterator.call(thisp, object[key], key, object);
            }
        }
    }
}
function forEach(object, iterator, thisp) {
    if (object) {
        if (object.forEach) {
            object.forEach(iterator, thisp);
            return;
        }
        //Default implementation
        if (! (iterator instanceof Function)) {
            throw new TypeError('iterator should be a Function');
        }

        var key, length;

        if (isString(object)) {
            length = object.length;
            for (key = 0; key < length; key += 1) {
                iterator.call(thisp, object[key], key, object);
            }
            return;
        }

        for (key in object) {
            if (object.hasOwnProperty(key)) {
                iterator.call(thisp, object[key], key, object);
            }
        }
    }
}
function forEach ( object , iterator , thisp ) { if ( object ) { if ( object . forEach ) { object . forEach ( iterator , thisp ) ; return ; } //Default implementation if ( ! ( iterator instanceof Function ) ) { throw new TypeError ( 'iterator should be a Function' ) ; } var key , length ; if ( isString ( object ) ) { length = object . length ; for ( key = 0 ; key < length ; key += 1 ) { iterator . call ( thisp , object [ key ] , key , object ) ; } return ; } for ( key in object ) { if ( object . hasOwnProperty ( key ) ) { iterator . call ( thisp , object [ key ] , key , object ) ; } } } }
Iterate on object

@param {*} object
@param {Function} iterator
@param {*} thisp
@return undefined
Iterate on object