vsanse/imgsharp

View on GitHub
engine.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function resize has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    resize(imgpath, outputPath, height, width, resizeAllImgs){
        let withoutEnlargement = resizeAllImgs?false:true;
        let minImgPath = path.join(outputPath)
        if(!fs.existsSync(outputPath)){
            fs.mkdirSync(outputPath, { recursive: true });
Severity: Major
Found in engine.js - About 2 hrs to fix

    Function optimize has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        optimize(imgpath, outputPath, imgQuality, isProgressive) {
            if(!fs.existsSync(outputPath)){
                fs.mkdirSync(outputPath, { recursive: true });
            }
            fs.readdirSync(imgpath).forEach(file=>{
    Severity: Minor
    Found in engine.js - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status