jsketcher/modules/ui/decoratorChain.js
2022-08-15 23:47:20 -07:00

9 lines
No EOL
251 B
JavaScript

export default function decoratorChain() {
const decorators = Array.from(arguments);
return function(Component) {
for (let i = decorators.length - 1; i >= 0; i --) {
Component = decorators[i](Component);
}
return Component;
}
}