MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / flattenChildren

Function flattenChildren

examples/simple/react.js:16077–16084  ·  view source on GitHub ↗

* Flattens children that are typically specified as `props.children`. Any null * children will not be included in the resulting object. * @return {!object} flattened children keyed by name.

(children)

Source from the content-addressed store, hash-verified

16075 * @return {!object} flattened children keyed by name.
16076 */
16077function flattenChildren(children) {
16078 if (children == null) {
16079 return children;
16080 }
16081 var result = {};
16082 traverseAllChildren(children, flattenSingleChildIntoContext, result);
16083 return result;
16084}
16085
16086module.exports = flattenChildren;
16087},{"126":126,"154":154}],109:[function(_dereq_,module,exports){

Callers 1

react.jsFile · 0.70

Calls 1

traverseAllChildrenFunction · 0.70

Tested by

no test coverage detected