Reactive-Extensions/RxJS

View on GitHub
modules/rx-core/rx.core.js

Summary

Maintainability
F
1 mo
Test Coverage

Showing 57 of 57 total issues

File rx.core.js has 936 lines of code (exceeds 250 allowed). Consider refactoring.
Open

// Copyright (c) Microsoft, All rights reserved. See License.txt in the project root for license information.
 
;(function (undefined) {
 
var objectTypes = {
Severity: Major
Found in modules/rx-core/rx.core.js - About 2 days to fix

    Function DefaultScheduler has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var DefaultScheduler = (function (__super__) {
    inherits(DefaultScheduler, __super__);
    function DefaultScheduler() {
    __super__.call(this);
    }
    Severity: Minor
    Found in modules/rx-core/rx.core.js - About 1 hr to fix

      Function Observable has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var Observable = Rx.Observable = (function () {
       
      function makeSubscribe(self, subscribe) {
      return function (o) {
      var oldOnError = o.onError;
      Severity: Minor
      Found in modules/rx-core/rx.core.js - About 1 hr to fix

        Function AbstractObserver has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) {
        inherits(AbstractObserver, __super__);
         
        /**
        * Creates a new observer in a non-stopped state.
        Severity: Minor
        Found in modules/rx-core/rx.core.js - About 1 hr to fix

          Function AutoDetachObserver has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var AutoDetachObserver = (function (__super__) {
          inherits(AutoDetachObserver, __super__);
           
          function AutoDetachObserver(observer) {
          __super__.call(this);
          Severity: Minor
          Found in modules/rx-core/rx.core.js - About 1 hr to fix

            Function CurrentThreadScheduler has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var CurrentThreadScheduler = (function (__super__) {
            var queue;
             
            function runTrampoline () {
            while (queue.length > 0) {
            Severity: Minor
            Found in modules/rx-core/rx.core.js - About 1 hr to fix

              Function AnonymousObservable has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var AnonymousObservable = Rx.AnonymousObservable = (function (__super__) {
              inherits(AnonymousObservable, __super__);
               
              // Fix subscriber to check for undefined or function returned to decorate as Disposable
              function fixSubscriber(subscriber) {
              Severity: Minor
              Found in modules/rx-core/rx.core.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                if (hasStacks &&
                observable.stack &&
                typeof error === 'object' &&
                error !== null &&
                error.stack &&
                Severity: Major
                Found in modules/rx-core/rx.core.js - About 40 mins to fix

                  Function ScheduledItem has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) {
                  Severity: Minor
                  Found in modules/rx-core/rx.core.js - About 35 mins to fix

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    (function () {
                     
                    var nextHandle = 1, tasksByHandle = {}, currentlyRunning = false;
                     
                    clearMethod = function (handle) {
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 6 days to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1506..1624
                    modules/rx-lite/rx.lite.js on lines 1157..1275
                    src/core/concurrency/defaultscheduler.js on lines 25..143

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var Observable = Rx.Observable = (function () {
                     
                    function makeSubscribe(self, subscribe) {
                    return function (o) {
                    var oldOnError = o.onError;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 3 days to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 2053..2131
                    modules/rx-lite/rx.lite.js on lines 1704..1782
                    src/core/observable.js on lines 6..84

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var DefaultScheduler = (function (__super__) {
                    inherits(DefaultScheduler, __super__);
                    function DefaultScheduler() {
                    __super__.call(this);
                    }
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 days to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1629..1689
                    modules/rx-lite/rx.lite.js on lines 1280..1340
                    src/core/concurrency/defaultscheduler.js on lines 148..208

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    (function (schedulerProto) {
                     
                    function invokeRecImmediate(scheduler, pair) {
                    var state = pair[0], action = pair[1], group = new CompositeDisposable();
                    action(state, innerAction);
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 days to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1299..1374
                    modules/rx-lite/rx.lite.js on lines 950..1025
                    src/core/concurrency/scheduler.recursive.js on lines 1..76

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) {
                    inherits(AbstractObserver, __super__);
                     
                    /**
                    * Creates a new observer in a non-stopped state.
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 2 other locations - About 2 days to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1941..2001
                    modules/rx-lite/rx.lite.js on lines 1592..1652

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var AnonymousObservable = Rx.AnonymousObservable = (function (__super__) {
                    inherits(AnonymousObservable, __super__);
                     
                    // Fix subscriber to check for undefined or function returned to decorate as Disposable
                    function fixSubscriber(subscriber) {
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 day to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 6824..6859
                    modules/rx-lite/rx.lite.js on lines 6475..6510
                    src/core/anonymousobservable.js on lines 1..36

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var Scheduler = Rx.Scheduler = (function () {
                     
                    function Scheduler() { }
                     
                    /** Determines whether the given object is a scheduler */
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 day to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1236..1295
                    modules/rx-lite/rx.lite.js on lines 887..946
                    src/core/concurrency/scheduler.js on lines 2..61

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var ObservableBase = Rx.ObservableBase = (function (__super__) {
                    inherits(ObservableBase, __super__);
                     
                    function fixSubscriber(subscriber) {
                    return subscriber && isFunction(subscriber.dispose) ? subscriber :
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 day to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 2133..2166
                    modules/rx-lite/rx.lite.js on lines 1849..1882
                    src/core/perf/observablebase.js on lines 1..34

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var CurrentThreadScheduler = (function (__super__) {
                    var queue;
                     
                    function runTrampoline () {
                    while (queue.length > 0) {
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 day to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1413..1447
                    modules/rx-lite/rx.lite.js on lines 1064..1098
                    src/core/concurrency/currentthreadscheduler.js on lines 4..38

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    var SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive = (function () {
                    function createTick(self) {
                    return function tick(command, recurse) {
                    recurse(0, self._period);
                    var state = tryCatch(self._action)(self._state);
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 1 other location - About 1 day to fix
                    modules/rx-core-testing/rx.core.testing.js on lines 499..528

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    priorityProto.heapify = function (index) {
                    +index || (index = 0);
                    if (index >= this.length || index < 0) { return; }
                    var left = 2 * index + 1,
                    right = 2 * index + 2,
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 day to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1726..1744
                    modules/rx-lite/rx.lite.js on lines 1377..1395
                    src/core/internal/priorityqueue.js on lines 34..52

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    var
                    noop = Rx.helpers.noop = function () { },
                    defaultNow = Rx.helpers.defaultNow = (function () { return !!Date.now ? Date.now : function () { return +new Date; }; }()),
                    defaultError = Rx.helpers.defaultError = function (err) { throw err; },
                    isPromise = Rx.helpers.isPromise = function (p) { return !!p && !isFunction(p.subscribe) && isFunction(p.then); },
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 1 other location - About 1 day to fix
                    src/core/headers/coreheader.js on lines 2..7

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var AnonymousObserver = Rx.AnonymousObserver = (function (__super__) {
                    inherits(AnonymousObserver, __super__);
                     
                    /**
                    * Creates an observer from the specified OnNext, OnError, and OnCompleted actions.
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 day to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 2006..2046
                    modules/rx-lite/rx.lite.js on lines 1657..1697
                    src/core/anonymousobserver.js on lines 4..44

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    function makeStackTraceLong(error, observable) {
                    // If possible, transform the error stack trace by removing Node and RxJS
                    // cruft, then concatenating with the stack trace of `observable`.
                    if (hasStacks &&
                    observable.stack &&
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 7 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 93..114
                    modules/rx-lite/rx.lite.js on lines 93..114
                    src/core/longstacktraces/longstacktraces.js on lines 3..24

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    CompositeDisposablePrototype.dispose = function () {
                    if (!this.isDisposed) {
                    this.isDisposed = true;
                    var len = this.disposables.length, currentDisposables = new Array(len);
                    for(var i = 0; i < len; i++) { currentDisposables[i] = this.disposables[i]; }
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 2 other locations - About 6 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1010..1022
                    modules/rx-lite/rx.lite.js on lines 661..673

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var CompositeDisposable = Rx.CompositeDisposable = function () {
                    var args = [], i, len;
                    if (Array.isArray(arguments[0])) {
                    args = arguments[0];
                    } else {
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 6 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 959..971
                    modules/rx-lite/rx.lite.js on lines 610..622
                    src/core/disposables/compositedisposable.js on lines 5..17

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    priorityProto.percolate = function (index) {
                    if (index >= this.length || index < 0) { return; }
                    var parent = index - 1 >> 1;
                    if (parent < 0 || parent === index) { return; }
                    if (this.isHigherPriority(index, parent)) {
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 6 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1714..1724
                    modules/rx-lite/rx.lite.js on lines 1365..1375
                    src/core/internal/priorityqueue.js on lines 22..32

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var addProperties = Rx.internals.addProperties = function (obj) {
                    for(var sources = [], i = 1, len = arguments.length; i < len; i++) { sources.push(arguments[i]); }
                    for (var idx = 0, ln = sources.length; idx < ln; idx++) {
                    var source = sources[idx];
                    for (var prop in source) {
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 5 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 930..938
                    modules/rx-lite/rx.lite.js on lines 581..589
                    src/core/internal/util.js on lines 10..18

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    function getFileNameAndLineNumber(stackLine) {
                    // Named functions: 'at functionName (filename:lineNumber:columnNumber)'
                    var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine);
                    if (attempt1) { return [attempt1[1], Number(attempt1[2])]; }
                     
                     
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 2 other locations - About 5 hrs to fix
                    modules/rx-lite/rx.lite.js on lines 161..173
                    src/core/longstacktraces/longstacktraces.js on lines 71..83

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var localTimer = (function () {
                    var localSetTimeout, localClearTimeout = noop;
                    if (!!root.setTimeout) {
                    localSetTimeout = root.setTimeout;
                    localClearTimeout = root.clearTimeout;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 5 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1484..1502
                    modules/rx-lite/rx.lite.js on lines 1135..1153
                    src/core/concurrency/defaultscheduler.js on lines 3..21

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                    if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
                    root.Rx = Rx;
                     
                    define(function() {
                    return Rx;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 2 other locations - About 5 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 7411..7427
                    modules/rx-lite/rx.lite.js on lines 7062..7078

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    function captureLine() {
                    if (!hasStacks) { return; }
                     
                    try {
                    throw new Error();
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 4 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 145..159
                    modules/rx-lite/rx.lite.js on lines 145..159
                    src/core/longstacktraces/longstacktraces.js on lines 55..69

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    (function (schedulerProto) {
                     
                    /**
                    * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation.
                    * @param {Mixed} state Initial state passed to the action upon the first iteration.
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 1 other location - About 4 hrs to fix
                    src/core/concurrency/scheduler.periodic.js on lines 1..17

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    function filterStackString(stackString) {
                    var lines = stackString.split('\n'), desiredLines = [];
                    for (var i = 0, len = lines.length; i < len; i++) {
                    var line = lines[i];
                     
                     
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 4 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 116..126
                    modules/rx-lite/rx.lite.js on lines 116..126
                    src/core/longstacktraces/longstacktraces.js on lines 26..36

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    CompositeDisposablePrototype.remove = function (item) {
                    var shouldDispose = false;
                    if (!this.isDisposed) {
                    var idx = this.disposables.indexOf(item);
                    if (idx !== -1) {
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 4 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 993..1005
                    modules/rx-lite/rx.lite.js on lines 644..656
                    src/core/disposables/compositedisposable.js on lines 39..51

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    isFunction = Rx.helpers.isFunction = (function () {
                    var isFn = function (value) {
                    return typeof value == 'function' || false;
                    };
                     
                     
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 1 other location - About 3 hrs to fix
                    src/core/headers/coreheader.js on lines 8..20

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) {
                    this.scheduler = scheduler;
                    this.state = state;
                    this.action = action;
                    this.dueTime = dueTime;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 3 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1210..1217
                    modules/rx-lite/rx.lite.js on lines 861..868
                    src/core/concurrency/scheduleditem.js on lines 1..8

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    SerialDisposable.prototype.setDisposable = function (value) {
                    var shouldDispose = this.isDisposed;
                    if (!shouldDispose) {
                    var old = this.current;
                    this.current = value;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 3 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1101..1109
                    modules/rx-lite/rx.lite.js on lines 752..760
                    src/core/disposables/booleandisposable.js on lines 32..40

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    priorityProto.remove = function (item) {
                    for (var i = 0; i < this.length; i++) {
                    if (this.items[i].value === item) {
                    this.removeAt(i);
                    return true;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1766..1774
                    modules/rx-lite/rx.lite.js on lines 1417..1425
                    src/core/internal/priorityqueue.js on lines 74..82

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var ImmediateScheduler = (function (__super__) {
                    inherits(ImmediateScheduler, __super__);
                    function ImmediateScheduler() {
                    __super__.call(this);
                    }
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1395..1406
                    modules/rx-lite/rx.lite.js on lines 1046..1057
                    src/core/concurrency/immediatescheduler.js on lines 2..13

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    SingleAssignmentDisposable.prototype.dispose = function () {
                    if (!this.isDisposed) {
                    this.isDisposed = true;
                    var old = this.current;
                    this.current = null;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1084..1091
                    modules/rx-lite/rx.lite.js on lines 735..742
                    src/core/disposables/booleandisposable.js on lines 15..22

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    SerialDisposable.prototype.dispose = function () {
                    if (!this.isDisposed) {
                    this.isDisposed = true;
                    var old = this.current;
                    this.current = null;
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1110..1117
                    modules/rx-lite/rx.lite.js on lines 761..768
                    src/core/disposables/booleandisposable.js on lines 41..48

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    priorityProto.removeAt = function (index) {
                    this.items[index] = this.items[--this.length];
                    this.items[this.length] = undefined;
                    this.heapify();
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1748..1752
                    modules/rx-lite/rx.lite.js on lines 1399..1403
                    src/core/internal/priorityqueue.js on lines 56..60

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    function isInternalFrame(stackLine) {
                    var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);
                    if (!fileNameAndLineNumber) {
                    return false;
                    }
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 2 hrs to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 128..138
                    modules/rx-lite/rx.lite.js on lines 128..138
                    src/core/longstacktraces/longstacktraces.js on lines 38..48

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var inherits = Rx.internals.inherits = function (child, parent) {
                    function __() { this.constructor = child; }
                    __.prototype = parent.prototype;
                    child.prototype = new __();
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 hr to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 924..928
                    modules/rx-lite/rx.lite.js on lines 575..579
                    src/core/internal/util.js on lines 4..8

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    CompositeDisposablePrototype.add = function (item) {
                    if (this.isDisposed) {
                    item.dispose();
                    } else {
                    this.disposables.push(item);
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 hr to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 979..986
                    modules/rx-lite/rx.lite.js on lines 630..637
                    src/core/disposables/compositedisposable.js on lines 25..32

                    Similar blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var observerCreate = Observer.create = function (onNext, onError, onCompleted) {
                    onNext || (onNext = noop);
                    onError || (onError = defaultError);
                    onCompleted || (onCompleted = noop);
                    return new AnonymousObserver(onNext, onError, onCompleted);
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 hr to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1930..1935
                    modules/rx-lite/rx.lite.js on lines 1581..1586
                    src/core/observer.js on lines 41..46

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    priorityProto.enqueue = function (item) {
                    var index = this.length++;
                    this.items[index] = new IndexedItem(PriorityQueue.count++, item);
                    this.percolate(index);
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 hr to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1760..1764
                    modules/rx-lite/rx.lite.js on lines 1411..1415
                    src/core/internal/priorityqueue.js on lines 68..72

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var addRef = Rx.internals.addRef = function (xs, r) {
                    return new AnonymousObservable(function (observer) {
                    return new BinaryDisposable(r.getDisposable(), xs.subscribe(observer));
                    });
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 hr to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 941..945
                    modules/rx-lite/rx.lite.js on lines 592..596
                    src/core/internal/util.js on lines 21..25

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    function arrayInitialize(count, factory) {
                    var a = new Array(count);
                    for (var i = 0; i < count; i++) {
                    a[i] = factory();
                    }
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 2 other locations - About 1 hr to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 947..953
                    modules/rx-lite/rx.lite.js on lines 598..604

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var BinaryDisposable = Rx.BinaryDisposable = function (first, second) {
                    this._first = first;
                    this._second = second;
                    this.isDisposed = false;
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 1 hr to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1119..1123
                    modules/rx-lite/rx.lite.js on lines 770..774
                    src/core/disposables/binarydisposable.js on lines 1..5

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var Disposable = Rx.Disposable = function (action) {
                    this.isDisposed = false;
                    this.action = action || noop;
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 50 mins to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1028..1031
                    modules/rx-lite/rx.lite.js on lines 679..682
                    src/core/disposables/disposable.js on lines 5..8

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    var PriorityQueue = Rx.internals.PriorityQueue = function (capacity) {
                    this.items = new Array(capacity);
                    this.length = 0;
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 50 mins to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1704..1707
                    modules/rx-lite/rx.lite.js on lines 1355..1358
                    src/core/internal/priorityqueue.js on lines 12..15

                    Identical blocks of code found in 4 locations. Consider refactoring.
                    Open

                    priorityProto.isHigherPriority = function (left, right) {
                    return this.items[left].compareTo(this.items[right]) < 0;
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 3 other locations - About 40 mins to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1710..1712
                    modules/rx-lite/rx.lite.js on lines 1361..1363
                    src/core/internal/priorityqueue.js on lines 18..20

                    Similar blocks of code found in 10 locations. Consider refactoring.
                    Open

                    var NotSupportedError = Rx.NotSupportedError = function (message) {
                    this.message = message || 'This operation is not supported';
                    Error.call(this);
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 9 other locations - About 35 mins to fix
                    modules/rx-core/rx.core.js on lines 52..55
                    modules/rx-lite-compat/rx.lite.compat.js on lines 545..548
                    modules/rx-lite-compat/rx.lite.compat.js on lines 552..555
                    modules/rx-lite/rx.lite.js on lines 196..199
                    modules/rx-lite/rx.lite.js on lines 203..206
                    src/core/headers/coreheader.js on lines 22..25
                    src/core/headers/coreheader.js on lines 28..31
                    src/core/internal/errors.js on lines 22..25
                    src/core/internal/errors.js on lines 29..32

                    Similar blocks of code found in 10 locations. Consider refactoring.
                    Open

                    var NotImplementedError = Rx.NotImplementedError = function (message) {
                    this.message = message || 'This operation is not implemented';
                    Error.call(this);
                    };
                    Severity: Major
                    Found in modules/rx-core/rx.core.js and 9 other locations - About 35 mins to fix
                    modules/rx-core/rx.core.js on lines 58..61
                    modules/rx-lite-compat/rx.lite.compat.js on lines 545..548
                    modules/rx-lite-compat/rx.lite.compat.js on lines 552..555
                    modules/rx-lite/rx.lite.js on lines 196..199
                    modules/rx-lite/rx.lite.js on lines 203..206
                    src/core/headers/coreheader.js on lines 22..25
                    src/core/headers/coreheader.js on lines 28..31
                    src/core/internal/errors.js on lines 22..25
                    src/core/internal/errors.js on lines 29..32

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    var root = freeGlobal || ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || freeSelf || thisGlobal || Function('return this')();
                    Severity: Minor
                    Found in modules/rx-core/rx.core.js and 2 other locations - About 35 mins to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 21..21
                    modules/rx-lite/rx.lite.js on lines 21..21

                    Identical blocks of code found in 3 locations. Consider refactoring.
                    Open

                    ScheduledItem.prototype.invokeCore = function () {
                    return disposableFixup(this.action(this.scheduler, this.state));
                    };
                    Severity: Minor
                    Found in modules/rx-core/rx.core.js and 2 other locations - About 35 mins to fix
                    modules/rx-lite-compat/rx.lite.compat.js on lines 1231..1233
                    modules/rx-lite/rx.lite.js on lines 882..884

                    There are no issues that match your filters.

                    Category
                    Status