Showing 206 of 267 total issues
Function mapHtmlTypes
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function mapHtmlTypes(inputInfo){
var htmlType;
switch(inputInfo.type.toLowerCase()){
case 'integer':
htmlType = inputInfo.min != undefined ? 'range' : 'number';
- Create a ticketCreate a ticket
Function runInBrowserContext
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function runInBrowserContext(input, callback, step, options) {
// to ignore this from getting browserified
const puppeteer = eval('require')('puppeteer');
- Create a ticketCreate a ticket
Function replaceImage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function replaceImage (img, steps) {
var url = img.src;
// refactor to filetypeFromUrl()
var ext = url.split('?')[0].split('.').pop();
- Create a ticketCreate a ticket
Function PaintBucket
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function PaintBucket(options, UI) {
var output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
Function onCallback
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
internalSequencer.run(function onCallback(internalOutput) {
getPixels(internalOutput, function(err, pixels) {
options.firstImagePixels = pixels;
- Create a ticketCreate a ticket
Function GridOverlay
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function GridOverlay(options, UI) {
var output;
function draw(input, callback, progressObj) {
- Create a ticketCreate a ticket
Function draw
has 29 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 colorHalftone
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var colorHalftone = function colorHalftone(id, options, download) {
// try to create a WebGL canvas (will fail if WebGL isn't supported)
try {
var canvas = fx.canvas(1500, 1500);
- Create a ticketCreate a ticket
Function extraManipulation
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extraManipulation(pixels) {
let temp = parseInt(options.temperature);
temp /= 100;
- Create a ticketCreate a ticket
Function setup
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setup() {
let x = 0,
y = 0;
// display original uncropped input image on initial setup
- Create a ticketCreate a ticket
Function draw
has 28 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 Average
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Average(options, UI) {
var output;
options.step.metadata = options.step.metadata || {};
- 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 Channel
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function Channel(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.channel = options.channel || defaults.channel;
- 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 canvasResize
has a Cognitive Complexity of 10 (exceeds 5 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');
- 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 generatePreview
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generatePreview(previewStepName, customValues, path, DomNode) {
var previewSequencer = ImageSequencer();
function insertPreview(src) {
var img = document.createElement('img');
img.classList.add('img-thumbnail');
- Create a ticketCreate a ticket
Function draw
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
options.saturation = options.saturation || defaults.saturation;
progressObj.stop(true);
- Create a ticketCreate a ticket
Function draw
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback) {
var step = this;
options.angle = options.angle || defaults.angle;
- Create a ticketCreate a ticket
Function Invert
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Invert(options, UI) {
var output;
// The function which is called on every draw.
- Create a ticketCreate a ticket
Function draw
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
var color = options.color || defaults.color;
color = color.substring(color.indexOf('(') + 1, color.length - 1); // extract only the values from rgba(_,_,_,_)
color = color.split(',');
- Create a ticketCreate a ticket
Function draw
has 26 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