Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/lib/index.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 515 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40svgr/babel-plugin-remove-jsx-attribute/lib/index.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/@svgr/babel-plugin-remove-jsx-attribute/lib/index.js
-
curl -L -o index.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/94e32638a275d46bc1ba62feac204fcaaf313da4/frontend/node_modules/%40svgr/babel-plugin-remove-jsx-attribute/lib/index.js
515 Bytes
| ; | |
| exports.__esModule = true; | |
| exports.default = void 0; | |
| const removeJSXAttribute = (api, opts) => ({ | |
| visitor: { | |
| JSXOpeningElement(path) { | |
| if (!opts.elements.includes(path.node.name.name)) return; | |
| path.get('attributes').forEach(attribute => { | |
| const nodeName = attribute.node.name; | |
| if (nodeName && opts.attributes.includes(nodeName.name)) { | |
| attribute.remove(); | |
| } | |
| }); | |
| } | |
| } | |
| }); | |
| var _default = removeJSXAttribute; | |
| exports.default = _default; |