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
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports["default"] = camelCaseProperty;
|
---|
7 | var DASH = /-([a-z])/g;
|
---|
8 | var MS = /^Ms/g;
|
---|
9 | var cache = {};
|
---|
10 |
|
---|
11 | function toUpper(match) {
|
---|
12 | return match[1].toUpperCase();
|
---|
13 | }
|
---|
14 |
|
---|
15 | function 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.