main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
840 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = prefixProperty;
|
---|
7 |
|
---|
8 | var _capitalizeString = require('./capitalizeString');
|
---|
9 |
|
---|
10 | var _capitalizeString2 = _interopRequireDefault(_capitalizeString);
|
---|
11 |
|
---|
12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
---|
13 |
|
---|
14 | function prefixProperty(prefixProperties, property, style) {
|
---|
15 | var requiredPrefixes = prefixProperties[property];
|
---|
16 |
|
---|
17 | if (requiredPrefixes && style.hasOwnProperty(property)) {
|
---|
18 | var capitalizedProperty = (0, _capitalizeString2.default)(property);
|
---|
19 |
|
---|
20 | for (var i = 0; i < requiredPrefixes.length; ++i) {
|
---|
21 | var prefixedProperty = requiredPrefixes[i] + capitalizedProperty;
|
---|
22 |
|
---|
23 | if (!style[prefixedProperty]) {
|
---|
24 | style[prefixedProperty] = style[property];
|
---|
25 | }
|
---|
26 | }
|
---|
27 | }
|
---|
28 |
|
---|
29 | return style;
|
---|
30 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.