source: imaps-frontend/node_modules/css-in-js-utils/es/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: 368 bytes
Line 
1var DASH = /-([a-z])/g;
2var MS = /^Ms/g;
3var cache = {};
4
5function toUpper(match) {
6 return match[1].toUpperCase();
7}
8
9export default function camelCaseProperty(property) {
10 if (cache.hasOwnProperty(property)) {
11 return cache[property];
12 }
13
14 var camelProp = property.replace(DASH, toUpper).replace(MS, 'ms');
15 cache[property] = camelProp;
16 return camelProp;
17}
Note: See TracBrowser for help on using the repository browser.