animate/webGl/my-threejs-test/node_modules/htmlnano/lib/modules/custom.mjs

17 lines
369 B
JavaScript
Raw Normal View History

2024-06-24 09:24:00 +00:00
/** Meta-module that runs custom modules */
export default function custom(tree, options, customModules) {
if (! customModules) {
return tree;
}
if (! Array.isArray(customModules)) {
customModules = [customModules];
}
customModules.forEach(customModule => {
tree = customModule(tree, options);
});
return tree;
}