Spaces:
Sleeping
Sleeping
pythonic-rag-FastAPIReact / frontend /node_modules /@mui /utils /createChainedFunction /createChainedFunction.js
Download frontend/node_modules/@mui/utils/createChainedFunction/createChainedFunction.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 520 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/utils/createChainedFunction/createChainedFunction.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/@mui/utils/createChainedFunction/createChainedFunction.js
-
curl -L -o createChainedFunction.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/utils/createChainedFunction/createChainedFunction.js
520 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { | |
| value: true | |
| }); | |
| exports.default = createChainedFunction; | |
| /** | |
| * Safe chained function. | |
| * | |
| * Will only create a new function if needed, | |
| * otherwise will pass back existing functions or null. | |
| */ | |
| function createChainedFunction(...funcs) { | |
| return funcs.reduce((acc, func) => { | |
| if (func == null) { | |
| return acc; | |
| } | |
| return function chainedFunction(...args) { | |
| acc.apply(this, args); | |
| func.apply(this, args); | |
| }; | |
| }, () => {}); | |
| } |