Showing 256 of 374 total issues
Function 22
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"component-emitter":17,"engine.io-parser":29}],22:[function(require,module,exports){
(function (global){
/**
* Module dependencies
*/
Function inheritWith
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Function_prototype.inheritWith = !supportsProto ? function inheritWith(creator, mixins) {
/// <signature>
/// <summary>Inherits the function's prototype to a new function named constructor returned by the creator parameter
///<br/><br/>
/// var Square = Figure.inheritWith(function(base, baseCtor) { <br/>
Function close
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Socket.prototype.close = function () {
if ('opening' == this.readyState || 'open' == this.readyState) {
this.readyState = 'closing';
var self = this;
Function 11
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./lib/":11}],11:[function(require,module,exports){
/**
* Module dependencies.
*/
Function 39
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
},{}],39:[function(require,module,exports){
/**
* Compiles a querystring
* Returns string representation of the object
*
- 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 onPartialStatus
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
'onPartialStatus': function(status) {
//console.warn('partial status', status);
switch (status && status.what) {
case 'agent':
update.call(this, this.agents);
- 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 set
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Elapsed.prototype.set = function() {
this.elapsedTime = this.to - this.from;
this.milliSeconds = this.elapsedTime;
var divider = 1000;
Function show
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Collapse.prototype.show = function () {
if (this.transitioning || this.$element.hasClass('in')) return
var startEvent = $.Event('show.bs.collapse')
this.$element.trigger(startEvent)
Function show
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.show = function (_relatedTarget) {
var that = this
var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
this.$element.trigger(e)
Function preProcessBindings
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function preProcessBindings(bindingsStringOrKeyValueArray, bindingOptions) {
bindingOptions = bindingOptions || {};
function processKeyValue(key, val) {
var writableVal;
Function init
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'init' : function (element, valueAccessor, allBindings, viewModel, bindingContext) {
var eventsToHandle = valueAccessor() || {};
ko.utils.objectForEach(eventsToHandle, function(eventName) {
if (typeof eventName == "string") {
ko.utils.registerEventHandler(element, eventName, function (event) {
Function encodePayloadAsBlob
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.encodePayloadAsBlob = function(packets, callback) {
function encodeOne(packet, doneCallback) {
exports.encodePacket(packet, true, true, function(encoded) {
var binaryIdentifier = new Uint8Array(1);
binaryIdentifier[0] = 1;
Function pause
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Polling.prototype.pause = function(onPause){
var pending = 0;
var self = this;
this.readyState = 'pausing';
Function resolveConfig
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function resolveConfig(componentName, errorCallback, config, callback) {
var result = {},
makeCallBackWhenZero = 2,
tryIssueCallback = function() {
if (--makeCallBackWhenZero === 0) {
Function update
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'update': function (element, valueAccessor, allBindings, viewModel, bindingContext) {
var value = valueAccessor(),
dataValue,
options = ko.utils.unwrapObservable(value),
shouldDisplay = true,
Function each
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Object.each = function(obj, callback, context) {
var value,
i = 0,
length = obj.length,
type = jQuery.type(obj),
Function getFirstResultFromLoaders
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getFirstResultFromLoaders(methodName, argsExceptCallback, callback, candidateLoaders) {
// On the first call in the stack, start with the full set of loaders
if (!candidateLoaders) {
candidateLoaders = ko.components['loaders'].slice(0); // Use a copy, because we'll be mutating this array
}
Function every
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Object.every = function(obj, callback, context) {
var value,
i = 0,
length = obj.length,
type = obj === null ? String(obj) : typeof obj === "object" || typeof obj === "function" ? class2type[class2type.toString.call(obj)] || "object" : typeof obj,
Function backdrop
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Modal.prototype.backdrop = function (callback) {
var animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
Function checkPosition
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Affix.prototype.checkPosition = function () {
if (!this.$element.is(':visible')) return
var scrollHeight = $(document).height()
var scrollTop = this.$window.scrollTop()