Spaces:
Sleeping
Sleeping
pythonic-rag-FastAPIReact / frontend /node_modules /@mui /utils /legacy /getValidReactChildren /getValidReactChildren.js
Download frontend/node_modules/@mui/utils/legacy/getValidReactChildren/getValidReactChildren.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 353 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/utils/legacy/getValidReactChildren/getValidReactChildren.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@mui/utils/legacy/getValidReactChildren/getValidReactChildren.js
-
curl -L -o getValidReactChildren.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/utils/legacy/getValidReactChildren/getValidReactChildren.js
353 Bytes
| import * as React from 'react'; | |
| /** | |
| * Gets only the valid children of a component, | |
| * and ignores any nullish or falsy child. | |
| * | |
| * @param children the children | |
| */ | |
| export default function getValidReactChildren(children) { | |
| return React.Children.toArray(children).filter(function (child) { | |
| return /*#__PURE__*/React.isValidElement(child); | |
| }); | |
| } |