You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
444 B

import cssifyDeclaration from './cssifyDeclaration';
export default function cssifyObject(style) {
var css = '';
for (var property in style) {
var value = style[property];
if (typeof value !== 'string' && typeof value !== 'number') {
continue;
} // prevents the semicolon after
// the last rule declaration
if (css) {
css += ';';
}
css += cssifyDeclaration(property, value);
}
return css;
}