lint: AttributePool.js
parent
efc323cd71
commit
76744d9783
|
@ -1,3 +1,4 @@
|
||||||
|
'use strict';
|
||||||
/**
|
/**
|
||||||
* This code represents the Attribute Pool Object of the original Etherpad.
|
* This code represents the Attribute Pool Object of the original Etherpad.
|
||||||
* 90% of the code is still like in the original Etherpad
|
* 90% of the code is still like in the original Etherpad
|
||||||
|
@ -69,7 +70,7 @@ AttributePool.prototype.getAttribValue = function (num) {
|
||||||
};
|
};
|
||||||
|
|
||||||
AttributePool.prototype.eachAttrib = function (func) {
|
AttributePool.prototype.eachAttrib = function (func) {
|
||||||
for (const n in this.numToAttrib) {
|
for (const n of this.numToAttrib) {
|
||||||
const pair = this.numToAttrib[n];
|
const pair = this.numToAttrib[n];
|
||||||
func(pair[0], pair[1]);
|
func(pair[0], pair[1]);
|
||||||
}
|
}
|
||||||
|
@ -86,7 +87,7 @@ AttributePool.prototype.fromJsonable = function (obj) {
|
||||||
this.numToAttrib = obj.numToAttrib;
|
this.numToAttrib = obj.numToAttrib;
|
||||||
this.nextNum = obj.nextNum;
|
this.nextNum = obj.nextNum;
|
||||||
this.attribToNum = {};
|
this.attribToNum = {};
|
||||||
for (const n in this.numToAttrib) {
|
for (const n of this.numToAttrib) {
|
||||||
this.attribToNum[String(this.numToAttrib[n])] = Number(n);
|
this.attribToNum[String(this.numToAttrib[n])] = Number(n);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue