Showing 219 of 363 total issues
Function AsyncSubject
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var AsyncSubject = Rx.AsyncSubject = (function (_super) {
function subscribe(observer) {
checkDisposed.call(this);
Function Sizzle
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Sizzle( selector, context, results, seed ) {
var match, elem, m, nodeType,
// QSA vars
i, groups, old, nid, newContext, newSelector;
Function commit
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
Open
Transaction.prototype.commit = function () {
// clear timeout
if (this.commitScheduled) {
clearTimeout(this.commitScheduled);
- 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 BehaviorSubject
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var BehaviorSubject = Rx.BehaviorSubject = (function (_super) {
function subscribe(observer) {
checkDisposed.call(this);
if (!this.isStopped) {
this.observers.push(observer);
Function add
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
add: function( elem, types, handler, data, selector ) {
var handleObjIn, eventHandle, tmp,
events, t, handleObj,
special, handlers, type, namespaces, origType,
Function matcherFromGroupMatchers
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
var bySet = setMatchers.length > 0,
byElement = elementMatchers.length > 0,
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
Function done
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function done( status, nativeStatusText, responses, headers ) {
var isSuccess, success, error, response, modified,
statusText = nativeStatusText;
// Called once
Function setMatcher
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
if ( postFilter && !postFilter[ expando ] ) {
postFilter = setMatcher( postFilter );
}
if ( postFinder && !postFinder[ expando ] ) {
Function combineTemplate
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Bacon.combineTemplate = function(template) {
var applyStreamValue, combinator, compile, compileTemplate, constantValue, current, funcs, mkContext, setValue, streams;
funcs = [];
streams = [];
current = function(ctxStack) {
Function baseClone
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function baseClone(value, isDeep, callback, stackA, stackB) {
if (callback) {
var result = callback(value);
if (typeof result != 'undefined') {
return result;
Function buffer
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
EventStream.prototype.buffer = function(delay, onInput, onFlush) {
var buffer, delayMs, reply;
if (onInput == null) {
onInput = nop;
}
Function Subject
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Subject = Rx.Subject = (function (_super) {
function subscribe(observer) {
checkDisposed.call(this);
if (!this.isStopped) {
this.observers.push(observer);
Function template
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function template(text, data, options) {
// based on John Resig's `tmpl` implementation
// http://ejohn.org/blog/javascript-micro-templating/
// and Laura Doktorova's doT.js
// https://github.com/olado/doT
Function PausableBufferedObservable
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var PausableBufferedObservable = (function (_super) {
inherits(PausableBufferedObservable, _super);
function subscribe(observer) {
Function delay
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
observableProto.delay = function (dueTime, scheduler) {
scheduler || (scheduler = timeoutScheduler);
var source = this;
return new AnonymousObservable(function (observer) {
var active = false,
Function superMatcher
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
superMatcher = function( seed, context, xml, results, outermost ) {
var elem, j, matcher,
matchedCount = 0,
i = "0",
unmatched = seed && [],
Function timeoutWithSelector
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
observableProto.timeoutWithSelector = function (firstTimeout, timeoutdurationSelector, other) {
if (arguments.length === 1) {
timeoutdurationSelector = firstTimeout;
var firstTimeout = observableNever();
}
Function CHILD
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
"CHILD": function( type, what, argument, first, last ) {
var simple = type.slice( 0, 3 ) !== "nth",
forward = type.slice( -4 ) !== "last",
ofType = what === "of-type";
Function Deferred
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Deferred: function( func ) {
var tuples = [
// action, add listener, listener list, final state
[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
Function ScheduledObserver
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var ScheduledObserver = Rx.internals.ScheduledObserver = (function (_super) {
inherits(ScheduledObserver, _super);
function ScheduledObserver(scheduler, observer) {
_super.call(this);