ezcss
Version:
Super lite CSS-in-JS
15 lines (14 loc) • 576 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.noop = function () { };
var KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g;
var REVERSE_REGEX = /-[a-z\u00E0-\u00F6\u00F8-\u00FE]/g;
function kebabCase(str) {
return str.replace(KEBAB_REGEX, function (match) { return '-' + match.toLowerCase(); });
}
exports.kebabCase = kebabCase;
function camelCase(str) {
return str.replace(REVERSE_REGEX, function (match) { return match.slice(1).toUpperCase(); });
}
exports.camelCase = camelCase;
exports.isClient = typeof window === 'object';
;