Showing 206 of 267 total issues
Function draw
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
progressObj.stop(true);
progressObj.overrideFlag = true;
var step = this;
- Create a ticketCreate a ticket
Function flipImage
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function flipImage(oldPixels, pixels, axis) {
const pixelSetter = require('../../util/pixelSetter.js');
var width = oldPixels.shape[0],
height = oldPixels.shape[1];
- 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 InsertStep
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function InsertStep(ref, index, name, o) {
if (ref.sequences[name]) {
return ref.importJSON(ref.sequences[name]);
}
- 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 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
const defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.rotate = options.rotate || defaults.rotate;
- Create a ticketCreate a ticket
Function CImage
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function CImage(src, step, callback) {
var datauri;
if (src.match(/^data:/i)) {
datauri = src;
callback(datauri, step);
- Create a ticketCreate a ticket
Function Crop
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Crop(pixels, options, cb) {
var 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 draw
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
const defaults = require('./../../util/getDefaults.js')(require('./info.json'));
const pixelSetter = require('../../util/pixelSetter.js');
- Create a ticketCreate a ticket
Function Dither
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Dither(pixels, type) {
type = type;
let bayerThresholdMap = [
[15, 135, 45, 165],
[195, 75, 225, 105],
- Create a ticketCreate a ticket
Function exports
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(pixels){
var canvas = document.createElement('canvas');
canvas.width = pixels.shape[0];
canvas.height = pixels.shape[1];
var ctx = canvas.getContext('2d');
- Create a ticketCreate a ticket
File demo.js
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
var defaultHtmlSequencerUi = require('./lib/defaultHtmlSequencerUi.js'),
setupCache = require('./lib/cache.js'),
intermediateHtmlStepUi = require('./lib/intermediateHtmlStepUi.js'),
DefaultHtmlStepUi = require('./lib/defaultHtmlStepUi.js'),
urlHash = require('./lib/urlHash.js'),
- Create a ticketCreate a ticket
Function onload
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
image.onload = function() {
var texture = canvas.texture(image);
// var bbox1 = {
- Create a ticketCreate a ticket
Function Average
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Average(options, UI) {
var output;
options.step.metadata = options.step.metadata || {};
- Create a ticketCreate a ticket
Function draw
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
progressObj.stop(true);
progressObj.overrideFlag = true;
var step = this;
- Create a ticketCreate a ticket
Function AddQR
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function AddQR(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
getPixels = require('get-pixels');
- Create a ticketCreate a ticket
Function draw
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function draw(input, callback, progressObj) {
options.temperature = options.temperature || defaults.temperature;
options.temperature = (options.temperature > 40000) ? 40000 : options.temperature;
options.temperature = (options.temperature < 0) ? 0 : options.temperature;
- Create a ticketCreate a ticket
Function InsertStep
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function InsertStep(ref, index, name, o) {
if (ref.sequences[name]) {
return ref.importJSON(ref.sequences[name]);
}
- Create a ticketCreate a ticket
Function ColorHalftone
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function ColorHalftone(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
var output;
- 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 47 lines of code (exceeds 25 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;
- Create a ticketCreate a ticket
Function Contrast
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function Contrast(options, UI) {
var defaults = require('./../../util/getDefaults.js')(require('./info.json'));
options.contrast = options.contrast || defaults.contrast;
var output;
- Create a ticketCreate a ticket
Function ReplaceImage
has 45 lines of code (exceeds 25 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);
- Create a ticketCreate a ticket