Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
FogNetwork
GitHub Repository: FogNetwork/Tsunami
Path: blob/main/public/games/files/garbage-collector/js/base-object.js
1036 views
1
/*globals define*/
2
define(function() {
3
'use strict';
4
5
function BaseObject() {
6
this.type = this.constructor.name.toLowerCase();
7
}
8
9
BaseObject.prototype.set = function( attrs ) {
10
for ( var key in attrs ) {
11
if ( this.hasOwnProperty( key ) ) {
12
this[ key ] = attrs[ key ];
13
}
14
}
15
};
16
17
return BaseObject;
18
});
19
20