MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / forOwnRight

Function forOwnRight

MathBox/mathbox-bundle.js:37262–37274  ·  view source on GitHub ↗

* This method is like `_.forOwn` except that it iterates over elements * of a `collection` in the opposite order. * * @static * @memberOf _ * @category Objects * @param {Object} object The object to iterate over. * @param {Function} [callback=identity] The function

(object, callback, thisArg)

Source from the content-addressed store, hash-verified

37260 * // => logs 'length', '1', and '0' assuming `_.forOwn` logs '0', '1', and 'length'
37261 */
37262 function forOwnRight(object, callback, thisArg) {
37263 var props = keys(object),
37264 length = props.length;
37265
37266 callback = baseCreateCallback(callback, thisArg, 3);
37267 while (length--) {
37268 var key = props[length];
37269 if (callback(object[key], key, object) === false) {
37270 break;
37271 }
37272 }
37273 return object;
37274 }
37275
37276 /**
37277 * Creates a sorted array of property names of all enumerable properties,

Callers 1

findLastKeyFunction · 0.85

Calls 2

baseCreateCallbackFunction · 0.85
callbackFunction · 0.70

Tested by

no test coverage detected