source: imaps-frontend/node_modules/css-in-js-utils/lib/camelCaseProperty.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 473 bytes
RevLine 
[d565449]1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports["default"] = camelCaseProperty;
7var DASH = /-([a-z])/g;
8var MS = /^Ms/g;
9var cache = {};
10
11function toUpper(match) {
12 return match[1].toUpperCase();
13}
14
15function camelCaseProperty(property) {
16 if (cache.hasOwnProperty(property)) {
17 return cache[property];
18 }
19
20 var camelProp = property.replace(DASH, toUpper).replace(MS, 'ms');
21 cache[property] = camelProp;
22 return camelProp;
23}
Note: See TracBrowser for help on using the repository browser.