deblan.io-murph/assets/js/app/app.js

18 lines
308 B
JavaScript
Raw Normal View History

2021-06-15 14:26:38 +02:00
const App = function (components) {
this.components = components || []
}
2021-06-15 14:26:38 +02:00
App.prototype.add = function (c) {
this.components.push(c)
2021-06-15 14:26:38 +02:00
return this
}
2021-06-15 14:26:38 +02:00
App.prototype.init = function () {
for (let u = 0, x = this.components.length; u < x; u++) {
this.components[u].init()
}
}
2021-03-29 19:40:55 +02:00
module.exports = App