MCPcopy
hub / github.com/garris/BackstopJS / keyOf

Function keyOf

examples/simpleReactApp/compiled.js:280–280  ·  view source on GitHub ↗
(oneKeyObj)

Source from the content-addressed store, hash-verified

278 147: [function (require, module, exports) { var isNode = require('./isNode'); function isTextNode (object) { return isNode(object) && object.nodeType == 3; }module.exports = isTextNode; }, { './isNode': 145 }],
279 148: [function (require, module, exports) { 'use strict'; var invariant = require('./invariant'); var keyMirror = function (obj) { var ret = {}; var key; 'production' !== 'production' ? invariant(obj instanceof Object && !Array.isArray(obj), 'keyMirror(...): Argument must be an object.') : invariant(obj instanceof Object && !Array.isArray(obj)); for (key in obj) { if (!obj.hasOwnProperty(key)) { continue; }ret[key] = key; } return ret; }; module.exports = keyMirror; }, { './invariant': 143 }],
280 149: [function (require, module, exports) { var keyOf = function (oneKeyObj) { var key; for (key in oneKeyObj) { if (!oneKeyObj.hasOwnProperty(key)) { continue; } return key; } return null; }; module.exports = keyOf; }, {}],
281 150: [function (require, module, exports) { 'use strict'; var hasOwnProperty = Object.prototype.hasOwnProperty; function mapObject (object, callback, context) { if (!object) { return null; } var result = {}; for (var name in object) { if (hasOwnProperty.call(object, name)) { result[name] = callback.call(context, object[name], name, object); } } return result; }module.exports = mapObject; }, {}],
282 151: [function (require, module, exports) { 'use strict'; function memoizeStringOnly (callback) { var cache = {}; return function (string) { if (!cache.hasOwnProperty(string)) { cache[string] = callback.call(this, string); } return cache[string]; }; }module.exports = memoizeStringOnly; }, {}],
283 152: [function (require, module, exports) { 'use strict'; var ReactElement = require('./ReactElement'); var invariant = require('./invariant'); function onlyChild (children) { 'production' !== 'production' ? invariant(ReactElement.isValidElement(children), 'onlyChild must be passed a children with exactly one child.') : invariant(ReactElement.isValidElement(children)); return children; }module.exports = onlyChild; }, { './ReactElement': 65, './invariant': 143 }],

Callers 1

compiled.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected