Showing 206 of 267 total issues
Function ConstrainedCrop
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function ConstrainedCrop(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
- Create a ticketCreate a ticket
Function DoNothing
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function DoNothing(options, UI) {
var output;
var gl = require('fisheyegl');
- Create a ticketCreate a ticket
Function canvasResize
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function canvasResize(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
const pixelSetter = require('../../util/pixelSetter.js');
- Create a ticketCreate a ticket
Function convolve
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
const convolve = (arrays, kernel, options = {}) => {
const pipeMode = options.pipeMode || false,
mode = options.mode || 'gpu';
const gpu = new GPU(mode != 'gpu' ? {mode} : {});
- Create a ticketCreate a ticket
Function Balance
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Balance(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.red = options.red || defaults.red;
- Create a ticketCreate a ticket
Function draw
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
progressObj.stop(true);
progressObj.overrideFlag = true;
- Create a ticketCreate a ticket
Function Ndvi
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Ndvi(options, UI) {
if (options.step.inBrowser) var ui = require('./Ui.js')(options.step, UI);
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
- Create a ticketCreate a ticket
Function ExportBin
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function ExportBin(dir = './output/', ref, basic, filename) {
// If user did not give an output filename so we can continue without doing anything
dir = (dir[dir.length - 1] == '/') ? dir : dir + '/';
if (ref.options.inBrowser) return false;
- Create a ticketCreate a ticket
Function ReplaceImage
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function ReplaceImage(ref, selector, steps, options) {
if(!ref.options.inBrowser) return false; // This isn't for Node.js
var tempSequencer = ImageSequencer({ui: false});
var this_ = ref;
if (window.hasOwnProperty('$')) var input = $(selector);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MinifyImage
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function MinifyImage(options, UI) {
var output;
if (!options.inBrowser) {
base64Img = require('base64-img');
imagemin = require('imagemin');
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Rotate
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Rotate(pixels, finalPixels, rotate_value, width, height, cos, sin){
const height_half = Math.floor(height / 2),
width_half = Math.floor(width / 2);
dimension = width + height;
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function generateOutput
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateOutput() {
if (!(renderableFrames < numFrames) && !(resolvedFrames < numFrames)) {
if (isGIF) {
const dataPromises = []; // Array of all DataURI promises
- Create a ticketCreate a ticket
Function draw
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
options.size = Number(options.size || defaults.size);
options.qrCodeString = options.qrCodeString || defaults.qrCodeString;
options.startingX = options.startingX || defaults.startingX;
- Create a ticketCreate a ticket
Function edgeDetect
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function edgeDetect(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.blur = options.blur || defaults.blur;
options.highThresholdRatio = options.highThresholdRatio || defaults.highThresholdRatio;
- Create a ticketCreate a ticket
Function drawStep
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function drawStep(drawarray, pos) {
if (pos == drawarray.length && drawarray[pos - 1] !== undefined) {
if (ref.objTypeOf(callback) == 'Function' && ref.steps.slice(-1)[0].output) {
var steps = ref.steps;
var out = steps[steps.length - 1].output.src;
- Create a ticketCreate a ticket
Function insertStep
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function insertStep(index, name, o_) {
if (ref.modules[name]) var moduleInfo = ref.modules[name][1];
else {
console.log('Module ' + name + ' not found.');
}
- Create a ticketCreate a ticket
Function nodejsGIFShot
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function nodejsGIFShot(options, cb) {
const puppeteer = eval('require')('puppeteer');
puppeteer.launch(
{
headless: true,
- Create a ticketCreate a ticket
Function Saturation
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Saturation(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
- Create a ticketCreate a ticket
Function UserInterface
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function UserInterface(events = {}) {
events.onSetup = events.onSetup || function(step) {
if (step.ui == false) {
// No UI
- Create a ticketCreate a ticket
Function draw
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback) {
var step = this;
function output(image, datauri, mimetype, wasmSuccess) {
step.output = { src: datauri, format: mimetype, wasmSuccess, useWasm: options.useWasm };
- Create a ticketCreate a ticket