UNPKG

vue-cli-plugin-tailwind-rollup-esm-component

Version:

Vue CLI 3.0 plugin (with Tailwind, PurgeCSS and Rollup) to use as a component starter

15 lines (14 loc) 364 B
module.exports = function() { return { toPascalCase(str) { const camelized = str.replace(/-([a-z])/g, c => c[1].toUpperCase()) return camelized.charAt(0).toUpperCase() + camelized.slice(1) }, toKebabCase(str) { return str .replace(/([a-z])([A-Z])/g, '$1-$2') .replace(/\s+/g, '-') .toLowerCase() } } }