Updated dependencies and linter

This commit is contained in:
n1474335 2019-07-05 12:22:52 +01:00
parent 4f70a79638
commit 5eb3979504
23 changed files with 383 additions and 263 deletions

View file

@ -184,10 +184,10 @@ class PairMapBase {
// self-stecker
return;
}
if (this.map.hasOwnProperty(a)) {
if (Object.prototype.hasOwnProperty.call(this.map, a)) {
throw new OperationError(`${name} connects ${pair[0]} more than once`);
}
if (this.map.hasOwnProperty(b)) {
if (Object.prototype.hasOwnProperty.call(this.map, b)) {
throw new OperationError(`${name} connects ${pair[1]} more than once`);
}
this.map[a] = b;
@ -203,7 +203,7 @@ class PairMapBase {
* @returns {number}
*/
transform(c) {
if (!this.map.hasOwnProperty(c)) {
if (!Object.prototype.hasOwnProperty.call(this.map, c)) {
return c;
}
return this.map[c];