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:
738 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports["default"] = cssifyObject;
|
---|
7 |
|
---|
8 | var _cssifyDeclaration = require("./cssifyDeclaration");
|
---|
9 |
|
---|
10 | var _cssifyDeclaration2 = _interopRequireDefault(_cssifyDeclaration);
|
---|
11 |
|
---|
12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
---|
13 |
|
---|
14 | function cssifyObject(style) {
|
---|
15 | var css = '';
|
---|
16 |
|
---|
17 | for (var property in style) {
|
---|
18 | var value = style[property];
|
---|
19 |
|
---|
20 | if (typeof value !== 'string' && typeof value !== 'number') {
|
---|
21 | continue;
|
---|
22 | } // prevents the semicolon after
|
---|
23 | // the last rule declaration
|
---|
24 |
|
---|
25 |
|
---|
26 | if (css) {
|
---|
27 | css += ';';
|
---|
28 | }
|
---|
29 |
|
---|
30 | css += (0, _cssifyDeclaration2["default"])(property, value);
|
---|
31 | }
|
---|
32 |
|
---|
33 | return css;
|
---|
34 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.