MCPcopy Create free account
hub / github.com/dtmilano/AndroidViewClient / mapObject

Function mapObject

docs/_static/underscore-1.13.1.js:761–771  ·  view source on GitHub ↗
(obj, iteratee, context)

Source from the content-addressed store, hash-verified

759 // Returns the results of applying the `iteratee` to each element of `obj`.
760 // In contrast to `_.map` it returns an object.
761 function mapObject(obj, iteratee, context) {
762 iteratee = cb(iteratee, context);
763 var _keys = keys(obj),
764 length = _keys.length,
765 results = {};
766 for (var index = 0; index < length; index++) {
767 var currentKey = _keys[index];
768 results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
769 }
770 return results;
771 }
772
773 // Predicate-generating function. Often useful outside of Underscore.
774 function noop(){}

Callers

nothing calls this directly

Calls 3

cbFunction · 0.85
keysFunction · 0.85
iterateeFunction · 0.85

Tested by

no test coverage detected