Showing 256 of 374 total issues
Function probe
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Socket.prototype.probe = function (name) {
debug('probing transport "%s"', name);
var transport = this.createTransport(name, { probe: 1 })
, failed = false
, self = this;
Function serialize
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
var serialize = function (property, object, callback, properties, whitespace, indentation, stack) {
var value, className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, result;
try {
// Necessary for host object support.
value = object[property];
Function 1
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports = Msg;
require('./utils');
var extend = require('extend'),
concat = Array.prototype.concat,
Function 34
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
},{}],34:[function(require,module,exports){
(function (global){
/**
* Create a blob builder even when vendor prefixes exist
*/
- Read upRead up
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 init
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
'init': function (element, valueAccessor, allBindings) {
var previousElementValue = element.value,
timeoutHandle,
elementValueBeforeEvent;
Function has
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
function has(name) {
if (has[name] !== undef) {
// Return cached feature test result.
return has[name];
}
Function 17
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
},{}],17:[function(require,module,exports){
/**
* Expose `Emitter`.
*/
- Read upRead up
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 17
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],17:[function(require,module,exports){
/**
* Expose `Emitter`.
*/
Function update
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function update(list) {
list.map = list.map || {};
switch (status && status.kind) {
case 'log':
var build = status.obj;
Function update
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function update(list) {
list.map = list.map || {};
switch (status && status.kind) {
case 'log':
var build = status.obj;
Function domNodeDisposal
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
ko.utils.domNodeDisposal = new (function () {
var domDataKey = ko.utils.domData.nextKey();
var cleanableNodeTypes = { 1: true, 8: true, 9: true }; // Element, Comment, Document
var cleanableNodeTypesWithDescendants = { 1: true, 9: true }; // Element, Document
Function init
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
'init': function (element, valueAccessor, allBindings) {
// If the value binding is placed on a radio/checkbox, then just pass through to checkedValue and quit
if (element.tagName.toLowerCase() == "input" && (element.type == "checkbox" || element.type == "radio")) {
ko.applyBindingAccessorsToNode(element, { 'checkedValue': valueAccessor });
return;
Function 9
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],9:[function(require,module,exports){
/**
* Expose `debug()` as the module.
*/
Function compareArrays
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
ko.utils.compareArrays = (function () {
var statusNotInOld = 'added', statusNotInNew = 'deleted';
// Simple calculation based on Levenshtein distance.
function compareArrays(oldArray, newArray, options) {
Function 21
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"./transport":21,"./transports":22,"component-emitter":17,"debug":9,"engine.io-parser":29,"indexof":44,"parsejson":38,"parseqs":39,"parseuri":40}],21:[function(require,module,exports){
/**
* Module dependencies.
*/
Function 4
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{}],4:[function(require,module,exports){
/*
Function doWrite
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
JSONPPolling.prototype.doWrite = function (data, fn) {
var self = this;
if (!this.form) {
var form = document.createElement('form');
Function get
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
var get = function (value) {
var results, hasMembers;
if (value == "$") {
// Unexpected end of input.
abort();
Function 33
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
},{}],33:[function(require,module,exports){
/*
* base64-arraybuffer
* https://github.com/niklasvh/base64-arraybuffer
*
- Read upRead up
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 38
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
},{}],38:[function(require,module,exports){
(function (global){
/**
* JSON parse.
*
- Read upRead up
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"