MCPcopy Create free account
hub / github.com/microsoft/SandDance / countChildren

Function countChildren

docs/external/js/react.development.js:1298–1302  ·  view source on GitHub ↗

* Count the number of children that are typically specified as * `props.children`. * * See https://reactjs.org/docs/react-api.html#reactchildrencount * * @param {?*} children Children tree container. * @return {number} The number of children.

(children)

Source from the content-addressed store, hash-verified

1296
1297
1298 function countChildren(children) {
1299 return traverseAllChildren(children, function () {
1300 return null;
1301 }, null);
1302 }
1303 /**
1304 * Flatten a children object (typically specified as `props.children`) and
1305 * return an array with appropriately re-keyed children.

Callers

nothing calls this directly

Calls 1

traverseAllChildrenFunction · 0.85

Tested by

no test coverage detected