Spaces:
Sleeping
Sleeping
pythonic-rag-FastAPIReact / frontend /node_modules /@mui /utils /esm /createChainedFunction /createChainedFunction.js
Download frontend/node_modules/@mui/utils/esm/createChainedFunction/createChainedFunction.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 414 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/%40mui/utils/esm/createChainedFunction/createChainedFunction.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/@mui/utils/esm/createChainedFunction/createChainedFunction.js
-
curl -L -o createChainedFunction.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/c9f908872ebbec3c4fa1392419c0f6cd3750ddb3/frontend/node_modules/%40mui/utils/esm/createChainedFunction/createChainedFunction.js
414 Bytes
| /** | |
| * Safe chained function. | |
| * | |
| * Will only create a new function if needed, | |
| * otherwise will pass back existing functions or null. | |
| */ | |
| export default 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); | |
| }; | |
| }, () => {}); | |
| } |