You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
473 B
23 lines
473 B
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports["default"] = camelCaseProperty;
|
|
var DASH = /-([a-z])/g;
|
|
var MS = /^Ms/g;
|
|
var cache = {};
|
|
|
|
function toUpper(match) {
|
|
return match[1].toUpperCase();
|
|
}
|
|
|
|
function camelCaseProperty(property) {
|
|
if (cache.hasOwnProperty(property)) {
|
|
return cache[property];
|
|
}
|
|
|
|
var camelProp = property.replace(DASH, toUpper).replace(MS, 'ms');
|
|
cache[property] = camelProp;
|
|
return camelProp;
|
|
} |