Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@mui/utils/legacy/exactProp/exactProp.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 981 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/utils/legacy/exactProp/exactProp.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@mui/utils/legacy/exactProp/exactProp.js
-
curl -L -o exactProp.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40mui/utils/legacy/exactProp/exactProp.js
981 Bytes
| import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | |
| import _extends from "@babel/runtime/helpers/esm/extends"; | |
| // This module is based on https://github.com/airbnb/prop-types-exact repository. | |
| // However, in order to reduce the number of dependencies and to remove some extra safe checks | |
| // the module was forked. | |
| var specialProperty = "exact-prop: \u200B"; | |
| export default function exactProp(propTypes) { | |
| if (process.env.NODE_ENV === 'production') { | |
| return propTypes; | |
| } | |
| return _extends({}, propTypes, _defineProperty({}, specialProperty, function (props) { | |
| var unsupportedProps = Object.keys(props).filter(function (prop) { | |
| return !propTypes.hasOwnProperty(prop); | |
| }); | |
| if (unsupportedProps.length > 0) { | |
| return new Error("The following props are not supported: ".concat(unsupportedProps.map(function (prop) { | |
| return "`".concat(prop, "`"); | |
| }).join(', '), ". Please remove them.")); | |
| } | |
| return null; | |
| })); | |
| } |