source: imaps-frontend/node_modules/css-in-js-utils/lib/cssifyObject.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: 738 bytes
RevLine 
[d565449]1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports["default"] = cssifyObject;
7
8var _cssifyDeclaration = require("./cssifyDeclaration");
9
10var _cssifyDeclaration2 = _interopRequireDefault(_cssifyDeclaration);
11
12function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
14function 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.