Showing 206 of 267 total issues
Function Channel
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Channel(options, UI) {
var output;
function draw(input, callback, progressObj) {
- 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 LoadImage
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
function LoadImage(ref, name, src, main_callback) {
function makeImage(datauri) {
var image = {
src: datauri,
format: datauri.split(':')[1].split(';')[0].split('/')[1]
- Create a ticketCreate a ticket
Function onload
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
window.onload = function () {
sequencer = ImageSequencer(); // Set the global sequencer variable
options = {
sortField: 'text',
- 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 extraManipulation
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extraManipulation(pixels) {
let [w, h] = pixels.shape;
let newPixels = require('ndarray')(new Uint8Array(4 * (w + Math.abs(options.X_value)) * (h + Math.abs(options.Y_value))).fill(0), [(w + Math.abs(options.X_value)), (h + Math.abs(options.Y_value)), 4]);
let iMax = w,
jMax = h;
- Create a ticketCreate a ticket
Function setInputStepInit
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setInputStepInit() {
return function setInputStep(options) {
var dropzone = $(options.dropZoneSelector);
- Create a ticketCreate a ticket
Function setInputStep
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function setInputStep(options) {
var dropzone = $(options.dropZoneSelector);
var fileInput = $(options.fileInputSelector);
var takePhoto = $(options.takePhotoSelector);
- Create a ticketCreate a ticket
Function Blend
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Blend(options, UI, util) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.func = options.blend || defaults.blend;
- Create a ticketCreate a ticket
Function exports
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-browser-sync');
grunt.loadNpmTasks('grunt-text-replace');
- Create a ticketCreate a ticket
Function ColorHalftone
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function ColorHalftone(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
- Create a ticketCreate a ticket
Function setInputStepInit
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function setInputStepInit() {
return function setInputStep(options) {
var dropzone = $(options.dropZoneSelector);
- 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 Gradient
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Gradient(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.gradientType = options.gradientType || defaults.gradientType;
- 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 draw
has 81 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 Dynamic
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Dynamic(options, UI, util) {
const defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.x = options.x || defaults.x;
options.y = options.y || defaults.y;
- Create a ticketCreate a ticket
Function Dynamic
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Dynamic(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
// This function is called on every draw.
- Create a ticketCreate a ticket
Function MinifyImage
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function MinifyImage(options, UI) {
var output;
if (!options.inBrowser) {
base64Img = require('base64-img');
imagemin = require('imagemin');
- Create a ticketCreate a ticket
Function ColorTemperature
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function ColorTemperature(options, UI) {
const pixelSetter = require('../../util/pixelSetter.js');
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
- 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 DefaultHtmlSequencerUi
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
function DefaultHtmlSequencerUi(_sequencer, options) {
options = options || {};
var addStepSel = options.addStepSel = options.addStepSel || '#addStep';
var removeStepSel = options.removeStepSel = options.removeStepSel || 'button.remove';
- Create a ticketCreate a ticket
Function formatInput
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formatInput(args, format, images) {
var json_q = {};
var format_i = format;
if (format == '+')
format = ['string_a', 'o_object'];
- Create a ticketCreate a ticket
Function Dither
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Dither(pixels, type) {
type = type;
let bayerThresholdMap = [
[15, 135, 45, 165],
[195, 75, 225, 105],
- 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 setupCache
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
var setupCache = function() {
let newWorker; // When sw.js is changed, this is the new service worker generated.
// Toggle a CSS class to display a popup prompting the user to fetch a new version.
function showUpdateModal() {
- Create a ticketCreate a ticket