Download node_modules/fast-xml-builder/src/ignoreAttributes.js from codebydante/extension-fish: direct link, hf CLI and curl.
- Browser
- Download file 586 Bytes
-
https://huggingface.co/datasets/codebydante/extension-fish/resolve/eefe2da4821d1138463587175c19243b0c225981/node_modules/fast-xml-builder/src/ignoreAttributes.js
- Command line
-
hf download hf://datasets/codebydante/extension-fish@eefe2da4821d1138463587175c19243b0c225981/node_modules/fast-xml-builder/src/ignoreAttributes.js
-
curl -L -o ignoreAttributes.js https://huggingface.co/datasets/codebydante/extension-fish/resolve/eefe2da4821d1138463587175c19243b0c225981/node_modules/fast-xml-builder/src/ignoreAttributes.js
586 Bytes
| export default function getIgnoreAttributesFn(ignoreAttributes) { | |
| if (typeof ignoreAttributes === 'function') { | |
| return ignoreAttributes | |
| } | |
| if (Array.isArray(ignoreAttributes)) { | |
| return (attrName) => { | |
| for (const pattern of ignoreAttributes) { | |
| if (typeof pattern === 'string' && attrName === pattern) { | |
| return true | |
| } | |
| if (pattern instanceof RegExp && pattern.test(attrName)) { | |
| return true | |
| } | |
| } | |
| } | |
| } | |
| return () => false | |
| } |