Cosmetic and functionally fixes for module root API

This commit is contained in:
FullGreaM 2025-01-19 05:18:50 +03:00
parent be5b975a48
commit d17b53d049

View File

@ -1,8 +1,8 @@
// Func
class OperatorsStorage extends Array {
constructor (...p) {
super(...p);
class OperatorStorage extends Array {
constructor () {
super();
this._indexObject = {};
this._indexObjectIndexOf = {};
}
@ -15,7 +15,7 @@ class OperatorsStorage extends Array {
}
}
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) {
@ -23,7 +23,7 @@ class OperatorsStorage extends Array {
return this._indexObject[item.operator] !== undefined;
}
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 {
constructor () {
this.operators = new OperatorsStorage();
this.operators = new OperatorStorage();
this.statics = new Object();
this.statics.Operator = Operator;
this.statics = { Operator };
}
}