src/compat/inject.js
Showing 2 of 2 total issues
Function fileReadAs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
let fileReadAs = function (blob, target) { let reader = new FileReader(); return new Promise((success, failure) => { reader.addEventListener("abort", () => { failure(new Error("Blob read aborted"));
Function replaceAll
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
String.prototype.replaceAll = String.prototype.replaceAll || function (source, target) { let antiLoop = 0, maxSafe = 16; let indexFinder = this, indexes = []; while (antiLoop < maxSafe && indexFinder.lastIndexOf(source) > -1) { let index = indexFinder.lastIndexOf(source);
- Read upRead up