]> git.r.bdr.sh - rbdr/serpentity/blob - lib/serpentity/component.js
e9abcd12df304691b58a5875baeaf0f3d73009e2
[rbdr/serpentity] / lib / serpentity / component.js
1 'use strict';
2
3 /* global Serpentity */
4
5 /*
6 * Components store data. Nothing to say here really, just
7 * inherit and add a prototype, or don't even inherit, see?
8 * It's just an empty class, so what I'm trying to say is your
9 * components can be any class whatsoever.
10 */
11
12 let Component = class Component {
13 constructor (config) {
14 Object.assign(this, config || {});
15 }
16 };
17
18 if (typeof module !== 'undefined' && this.module !== module) {
19 module.exports = Component;
20 } else {
21 Serpentity.Component = Component;
22 }