MCPcopy Create free account
hub / github.com/docker/getting-started / map

Function map

app/src/static/js/react-bootstrap.js:10833–10838  ·  view source on GitHub ↗

* Iterates through children that are typically specified as `props.children`, * but only maps over children that are "valid elements". * * The mapFunction provided index will be normalised to the components mapped, * so an invalid component would not increase the index. *

(children, func)

Source from the content-addressed store, hash-verified

10831 */
10832
10833function map(children, func) {
10834 var index = 0;
10835 return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Children.map(children, function (child) {
10836 return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.isValidElement(child) ? func(child, index++) : child;
10837 });
10838}
10839/**
10840 * Iterates through children that are "valid elements".
10841 *

Callers 1

react-bootstrap.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected