lix-website/themes/lix/assets/bootstrap/node_modules/@stylelint/postcss-css-in-js/camel-case.js

14 lines
307 B
JavaScript
Raw Normal View History

2024-04-27 03:39:10 +00:00
'use strict';
function camelCase(str) {
return str.replace(/[\w-]+/g, (s) => {
return /^-?[a-z]+(?:-[a-z]+)+$/.test(s)
? s
.replace(/^-(ms|moz|khtml|epub|(\w+-?)*webkit)(?=-)/i, '$1')
.replace(/-\w/g, (uncasedStr) => uncasedStr[1].toUpperCase())
: s;
});
}
module.exports = camelCase;