Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@mui/utils/exactProp/exactProp.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/utils/exactProp/exactProp.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/@mui/utils/exactProp/exactProp.js
-
curl -L -o exactProp.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/utils/exactProp/exactProp.js
1.04 kB
| ; | |
| var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | |
| Object.defineProperty(exports, "__esModule", { | |
| value: true | |
| }); | |
| exports.default = exactProp; | |
| var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/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. | |
| const specialProperty = 'exact-prop: \u200b'; | |
| function exactProp(propTypes) { | |
| if (process.env.NODE_ENV === 'production') { | |
| return propTypes; | |
| } | |
| return (0, _extends2.default)({}, propTypes, { | |
| [specialProperty]: props => { | |
| const unsupportedProps = Object.keys(props).filter(prop => !propTypes.hasOwnProperty(prop)); | |
| if (unsupportedProps.length > 0) { | |
| return new Error(`The following props are not supported: ${unsupportedProps.map(prop => `\`${prop}\``).join(', ')}. Please remove them.`); | |
| } | |
| return null; | |
| } | |
| }); | |
| } |