Download web/node_modules/camelcase-css/index.js from Amitkumar001/Law_Slm: direct link, hf CLI and curl.
- Browser
- Download file 536 Bytes
-
https://huggingface.co/Amitkumar001/Law_Slm/resolve/main/web/node_modules/camelcase-css/index.js
- Command line
-
hf download hf://Amitkumar001/Law_Slm/web/node_modules/camelcase-css/index.js
-
curl -L -o index.js https://huggingface.co/Amitkumar001/Law_Slm/resolve/main/web/node_modules/camelcase-css/index.js
536 Bytes
| ; | |
| const pattern = /-(\w|$)/g; | |
| const callback = (dashChar, char) => char.toUpperCase(); | |
| const camelCaseCSS = property => | |
| { | |
| property = property.toLowerCase(); | |
| // NOTE :: IE8's "styleFloat" is intentionally not supported | |
| if (property === "float") | |
| { | |
| return "cssFloat"; | |
| } | |
| // Microsoft vendor-prefixes are uniquely cased | |
| else if (property.startsWith("-ms-")) | |
| { | |
| return property.substr(1).replace(pattern, callback); | |
| } | |
| else | |
| { | |
| return property.replace(pattern, callback); | |
| } | |
| }; | |
| module.exports = camelCaseCSS; | |