getCompVarPrefix.js 251 B

1234
  1. var getCompVarPrefix = function getCompVarPrefix(component, prefix) {
  2. return "".concat([prefix, component.replace(/([A-Z]+)([A-Z][a-z]+)/g, '$1-$2').replace(/([a-z])([A-Z])/g, '$1-$2')].filter(Boolean).join('-'));
  3. };
  4. export default getCompVarPrefix;