fela-utils
Version:
Internal utilities for Fela
21 lines (16 loc) • 624 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = processStyleWithPlugins;
var _fastLoops = require("fast-loops");
function processStyleWithPlugins(renderer, style, type) {
var props = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var plugins = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : renderer.plugins;
if (plugins.length > 0) {
return (0, _fastLoops.arrayReduce)(plugins, function (processedStyle, plugin) {
return plugin(processedStyle, type, renderer, props);
}, style);
}
return style;
}