silphius/app/ecs/test-helper.js
2024-08-14 17:46:59 -05:00

14 lines
376 B
JavaScript

import Component from './component.js';
export function wrapComponents(Components) {
return Components
.reduce((Components, [componentName, properties]) => {
return {
...Components,
[componentName]: class extends Component {
static componentName = componentName;
static properties = properties;
},
};
}, {})
}