Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@emotion/is-prop-valid/src/index.ts from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 497 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40emotion/is-prop-valid/src/index.ts
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@emotion/is-prop-valid/src/index.ts
-
curl -L -o index.ts https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40emotion/is-prop-valid/src/index.ts
497 Bytes
| import memoize from '@emotion/memoize' | |
| declare const codegen: { require: (path: string) => any } | |
| // eslint-disable-next-line no-undef | |
| const reactPropsRegex: RegExp = codegen.require('./props') | |
| // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23 | |
| const isPropValid = /* #__PURE__ */ memoize( | |
| prop => | |
| reactPropsRegex.test(prop) || | |
| (prop.charCodeAt(0) === 111 /* o */ && | |
| prop.charCodeAt(1) === 110 /* n */ && | |
| prop.charCodeAt(2) < 91) /* Z+1 */ | |
| ) | |
| export default isPropValid | |