🎨 resolve linter errors (single quotes / no semicolons / no unused variables)

This commit is contained in:
Kevin van der Werff
2019-10-01 14:13:06 +02:00
parent 405e0d61cb
commit 0e49dc795d
6 changed files with 28 additions and 32 deletions

View File

@@ -5,20 +5,20 @@ if (!Array.prototype.flat) {
Object.defineProperty(Array.prototype, 'flat', {
configurable: true,
value: function flat () {
var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]);
var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0])
return depth ? Array.prototype.reduce.call(this, function (acc, cur) {
if (Array.isArray(cur)) {
acc.push.apply(acc, flat.call(cur, depth - 1));
acc.push.apply(acc, flat.call(cur, depth - 1))
} else {
acc.push(cur);
acc.push(cur)
}
return acc;
}, []) : Array.prototype.slice.call(this);
return acc
}, []) : Array.prototype.slice.call(this)
},
writable: true
});
})
}
/**