Code refactoring (es5 -> es2015)

This commit is contained in:
RainLoop Team 2016-07-07 00:03:30 +03:00
parent fb2e492ce8
commit 38a1041a73
42 changed files with 3081 additions and 3690 deletions

View file

@ -0,0 +1,34 @@
import _ from '_';
import {isArray, disposeObject} from 'Common/Utils';
class AbstractModel
{
/**
* @param {string} modelName
*/
constructor(modelName)
{
this.sModelName = modelName || '';
this.disposables = [];
}
regDisposables(value) {
if (isArray(value))
{
_.each(value, (item) => {
this.disposables.push(item);
});
}
else if (value)
{
this.disposables.push(value);
}
}
onDestroy() {
disposeObject(this);
}
}
export {AbstractModel, AbstractModel as default};