Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@emotion/memoize/src/index.ts from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 248 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40emotion/memoize/src/index.ts
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@emotion/memoize/src/index.ts
-
curl -L -o index.ts https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40emotion/memoize/src/index.ts
248 Bytes
| export default function memoize<V>(fn: (arg: string) => V): (arg: string) => V { | |
| const cache: Record<string, V> = Object.create(null) | |
| return (arg: string) => { | |
| if (cache[arg] === undefined) cache[arg] = fn(arg) | |
| return cache[arg] | |
| } | |
| } | |