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

Function countChildren

examples/simple/react.js:4333–4335  ·  view source on GitHub ↗

* Count the number of children that are typically specified as * `props.children`. * * @param {?*} children Children tree container. * @return {number} The number of children.

(children, context)

Source from the content-addressed store, hash-verified

4331 * @return {number} The number of children.
4332 */
4333function countChildren(children, context) {
4334 return traverseAllChildren(children, forEachSingleChildDummy, null);
4335}
4336
4337/**
4338 * Flatten a children object (typically specified as `props.children`) and

Callers

nothing calls this directly

Calls 1

traverseAllChildrenFunction · 0.70

Tested by

no test coverage detected