Cosmetic and functionally fixes for module root API
This commit is contained in:
parent
be5b975a48
commit
d17b53d049
@ -1,8 +1,8 @@
|
|||||||
// Func
|
// Func
|
||||||
|
|
||||||
class OperatorsStorage extends Array {
|
class OperatorStorage extends Array {
|
||||||
constructor (...p) {
|
constructor () {
|
||||||
super(...p);
|
super();
|
||||||
this._indexObject = {};
|
this._indexObject = {};
|
||||||
this._indexObjectIndexOf = {};
|
this._indexObjectIndexOf = {};
|
||||||
}
|
}
|
||||||
@ -15,7 +15,7 @@ class OperatorsStorage extends Array {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new TypeError("Into OperatorsStorage you can add only Operator's instances");
|
throw new TypeError("Into OperatorStorage you can add only Operator's instances");
|
||||||
}
|
}
|
||||||
|
|
||||||
includes (item) {
|
includes (item) {
|
||||||
@ -23,7 +23,7 @@ class OperatorsStorage extends Array {
|
|||||||
return this._indexObject[item.operator] !== undefined;
|
return this._indexObject[item.operator] !== undefined;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw new TypeError("Into OperatorsStorage storage only Operator type");
|
throw new TypeError("Into OperatorStorage storage only Operator type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,9 +41,8 @@ class Operator {
|
|||||||
|
|
||||||
module.exports = class NetHelperModule {
|
module.exports = class NetHelperModule {
|
||||||
constructor () {
|
constructor () {
|
||||||
this.operators = new OperatorsStorage();
|
this.operators = new OperatorStorage();
|
||||||
|
|
||||||
this.statics = new Object();
|
this.statics = { Operator };
|
||||||
this.statics.Operator = Operator;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user