File rx.all.js
has 10626 lines of code (exceeds 250 allowed). Consider refactoring.
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
Function groupJoin
has 71 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = function groupJoin(left, right, leftDurationSelector, rightDurationSelector, resultSelector) {
return new AnonymousObservable(function (o) {
var group = new CompositeDisposable();
var r = new RefCountDisposable(group);
var leftMap = new global.Map(),
Function join
has 61 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = function join(left, right, leftDurationSelector, rightDurationSelector, resultSelector) {
return new AnonymousObservable(function (o) {
var group = new CompositeDisposable();
var leftDone = false,
rightDone = false;
Function baseIsEqualDeep
has 50 lines of code (exceeds 25 allowed). Consider refactoring.
function baseIsEqualDeep(object, other, equalFunc, isLoose, stackA, stackB) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = arrayTag,
othTag = arrayTag;
Function windowTimeOrCount
has 47 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = function windowTimeOrCount(source, timeSpan, count, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new AnonymousObservable(function (observer) {
var timerD = new SerialDisposable(),
groupDisposable = new CompositeDisposable(timerD),
Function subscribeCore
has 46 lines of code (exceeds 25 allowed). Consider refactoring.
WindowTimeObservable.prototype.subscribeCore = function (o) {
var self = this;
var groupDisposable,
nextShift = self._timeShift,
nextSpan = self._timeSpan,
Function subscribeCore
has 44 lines of code (exceeds 25 allowed). Consider refactoring.
DelaySelectorObseravble.prototype.subscribeCore = function (o) {
var delays = new CompositeDisposable(),
atEnd = false,
subscription = new SerialDisposable(),
selector = this._selector,
Function subscribeCore
has 41 lines of code (exceeds 25 allowed). Consider refactoring.
RepeatWhenObservable.prototype.subscribeCore = function (o) {
var completions = new Subject(),
notifier = new Subject(),
handled = this._notifier(completions),
notificationDisposable = handled.subscribe(notifier);
Function subscribeCore
has 41 lines of code (exceeds 25 allowed). Consider refactoring.
CatchErrorWhenObservable.prototype.subscribeCore = function (o) {
var exceptions = new Subject(),
notifier = new Subject(),
handled = this._notifier(exceptions),
notificationDisposable = handled.subscribe(notifier);
Function observableWindowWithClosingSelector
has 36 lines of code (exceeds 25 allowed). Consider refactoring.
function observableWindowWithClosingSelector(source, windowClosingSelector) {
return new AnonymousObservable(function (o) {
var m = new SerialDisposable(),
d = new CompositeDisposable(m),
r = new RefCountDisposable(d),
Function equalObjects
has 34 lines of code (exceeds 25 allowed). Consider refactoring.
function equalObjects(object, other, equalFunc, isLoose, stackA, stackB) {
var objProps = keys(object),
objLength = objProps.length,
othProps = keys(other),
othLength = othProps.length;
Function exports
has 32 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = function (iterable, cb) {
var mode, thisArg = arguments[2], result, doBreak, broken, i, l, char, code;
if (isArray(iterable) || isArguments(iterable)) mode = 'array';
else if (isString(iterable)) mode = 'string';
else iterable = get(iterable);
Function cancelable
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
var cancelable = Scheduler.queue.scheduleRecursive(null, function (_, recurse) {
if (state.isDisposed) {
return;
}
var currentItem = e.next();
Function createTimer
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
function createTimer() {
var m = new SingleAssignmentDisposable(),
isSpan = false,
isShift = false;
timerD.setDisposable(m);
Function cancelable
has 30 lines of code (exceeds 25 allowed). Consider refactoring.
var cancelable = Scheduler.queue.scheduleRecursive(null, function (_, recurse) {
if (state.isDisposed) {
return;
}
var currentItem = e.next();
Function exports
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
module.exports = (function (status) {
var fn, set;
if (!status) return null;
if (status.level === 2) {
if (status.set) {
Function gs
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
d.gs = function (dscr, get, set) {
var c, e, options, desc;
if (typeof dscr !== 'string') {
options = set;
set = get;
Function scheduleRelative
has 28 lines of code (exceeds 25 allowed). Consider refactoring.
function scheduleRelative(state, recurse) {
if (state.error) {
return;
}
state.running = true;
Function observableWindowWithBoundaries
has 28 lines of code (exceeds 25 allowed). Consider refactoring.
function observableWindowWithBoundaries(source, windowBoundaries) {
return new AnonymousObservable(function (o) {
var win = new Subject(),
d = new CompositeDisposable(),
r = new RefCountDisposable(d);
Function match
has 27 lines of code (exceeds 25 allowed). Consider refactoring.
ActivePlan.prototype.match = function () {
var i,
len,
hasValues = true;
for (i = 0, len = this._joinObserverArray.length; i < len; i++) {
Function equalArrays
has 27 lines of code (exceeds 25 allowed). Consider refactoring.
function equalArrays(array, other, equalFunc, isLoose, stackA, stackB) {
var index = -1,
arrLength = array.length,
othLength = other.length;
Function scheduleRecursive
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
function scheduleRecursive(state, recurse) {
state.hasResult && state.o.onNext(state.result);
if (state.first) {
state.first = false;
Function scheduleRecursive
has 26 lines of code (exceeds 25 allowed). Consider refactoring.
function scheduleRecursive(state, recurse) {
state.hasResult && state.o.onNext(state.result);
if (state.first) {
state.first = false;
Consider simplifying this complex logical expression.
if (objCtor !== othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor === 'function' && objCtor instanceof objCtor && typeof othCtor === 'function' && othCtor instanceof othCtor)) {
return false;
}
Function equalArrays
has 6 arguments (exceeds 4 allowed). Consider refactoring.
function equalArrays(array, other, equalFunc, isLoose, stackA, stackB) {
Function GenerateAbsoluteObservable
has 6 arguments (exceeds 4 allowed). Consider refactoring.
function GenerateAbsoluteObservable(state, cndFn, itrFn, resFn, timeFn, s) {
Function baseIsEqualDeep
has 6 arguments (exceeds 4 allowed). Consider refactoring.
function baseIsEqualDeep(object, other, equalFunc, isLoose, stackA, stackB) {
Function exports
has 6 arguments (exceeds 4 allowed). Consider refactoring.
module.exports = function generateRelative(initialState, condition, iterate, resultSelector, timeSelector, scheduler) {
Function exports
has 6 arguments (exceeds 4 allowed). Consider refactoring.
module.exports = function generateAbsolute(initialState, condition, iterate, resultSelector, timeSelector, scheduler) {
Function GenerateRelativeObservable
has 6 arguments (exceeds 4 allowed). Consider refactoring.
function GenerateRelativeObservable(state, cndFn, itrFn, resFn, timeFn, s) {
Function equalObjects
has 6 arguments (exceeds 4 allowed). Consider refactoring.
function equalObjects(object, other, equalFunc, isLoose, stackA, stackB) {
Function GenerateObservable
has 5 arguments (exceeds 4 allowed). Consider refactoring.
function GenerateObservable(state, cndFn, itrFn, resFn, s) {
Function ZipObserver
has 5 arguments (exceeds 4 allowed). Consider refactoring.
function ZipObserver(o, i, p, q, d) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring.
module.exports = function groupJoin(left, right, leftDurationSelector, rightDurationSelector, resultSelector) {
Function ForkJoinObserver
has 5 arguments (exceeds 4 allowed). Consider refactoring.
function ForkJoinObserver(o, s, i, cb, subs) {
Function baseIsEqual
has 5 arguments (exceeds 4 allowed). Consider refactoring.
function baseIsEqual(value, other, isLoose, stackA, stackB) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring.
module.exports = function generate(initialState, condition, iterate, resultSelector, scheduler) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring.
module.exports = function replay(source, selector, bufferSize, windowSize, scheduler) {
Function TakeLastObserver
has 5 arguments (exceeds 4 allowed). Consider refactoring.
function TakeLastObserver(o, c, s, ss, ls) {
Function ScheduledItem
has 5 arguments (exceeds 4 allowed). Consider refactoring.
function ScheduledItem(scheduler, state, action, dueTime, comparer) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring.
module.exports = function join(left, right, leftDurationSelector, rightDurationSelector, resultSelector) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring.
module.exports = function flatMapLatest(source, limit, selector, resultSelector, thisArg) {
Avoid too many return
statements within this function.
return true;
Avoid too many return
statements within this function.
if (typeof map.forEach !== 'function') return false;
Avoid too many return
statements within this function.
if (typeof map.get !== 'function') return false;
Avoid too many return
statements within this function.
if (typeof Symbol.toPrimitive !== 'object') return false;
Avoid too many return
statements within this function.
if (typeof Symbol.unscopables !== 'object') return false;
Avoid too many return
statements within this function.
return true;
Avoid too many return
statements within this function.
if (typeof map.keys !== 'function') return false;
Avoid too many return
statements within this function.
if (typeof Symbol.toStringTag !== 'object') return false;
Avoid too many return
statements within this function.
if (typeof map.values !== 'function') return false;
Avoid too many return
statements within this function.
return (typeof value[iteratorSymbol] === 'function');
Avoid too many return
statements within this function.
if (typeof map.clear !== 'function') return false;
Avoid too many return
statements within this function.
if (typeof map.has !== 'function') return false;
Avoid too many return
statements within this function.
return true;
Avoid too many return
statements within this function.
if (typeof Symbol.iterator !== 'object') return false;
Avoid too many return
statements within this function.
return true;
Avoid too many return
statements within this function.
return len;
Avoid too many return
statements within this function.
if (typeof map.set !== 'function') return false;
Avoid too many return
statements within this function.
return result;
Avoid too many return
statements within this function.
if (typeof map.entries !== 'function') return false;
Avoid too many return
statements within this function.
if (!result.value) return false;
Avoid too many return
statements within this function.
if (typeof map.delete !== 'function') return false;
Avoid too many return
statements within this function.
if (result.value[0] !== 'raz') return false;
Avoid too many return
statements within this function.
if (result.value[1] !== 'one') return false;
Avoid too many return
statements within this function.
if (result.done !== false) return false;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
(function(global, process) {'use strict';
var Disposable = __webpack_require__(13);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
(function(global) {'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Disposable = __webpack_require__(13);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
(function(global) {'use strict';
var errors = __webpack_require__(7);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
(function(global) {'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
function IndexedItem(id, value) {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Disposable = __webpack_require__(13);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Observable = __webpack_require__(8);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Disposable = __webpack_require__(13);
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function groupJoin(left, right, leftDurationSelector, rightDurationSelector, resultSelector) {
return new AnonymousObservable(function (o) {
var group = new CompositeDisposable();
var r = new RefCountDisposable(group);
var leftMap = new global.Map(),
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Scheduler = __webpack_require__(12);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
var process = module.exports = {};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function join(left, right, leftDurationSelector, rightDurationSelector, resultSelector) {
return new AnonymousObservable(function (o) {
var group = new CompositeDisposable();
var leftDone = false,
rightDone = false;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Similar blocks of code found in 2 locations. Consider refactoring.
addProperties(ControlledSubject.prototype, Observer, {
_subscribe: function (o) {
return this.subject.subscribe(o);
},
onCompleted: function () {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Observable = __webpack_require__(8);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AsyncSubject = __webpack_require__(31);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var create = __webpack_require__(2);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AsyncSubject = __webpack_require__(31);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
function EmptyError() {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var inherits = __webpack_require__(6);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function windowTimeOrCount(source, timeSpan, count, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new AnonymousObservable(function (observer) {
var timerD = new SerialDisposable(),
groupDisposable = new CompositeDisposable(timerD),
Identical blocks of code found in 2 locations. Consider refactoring.
WindowTimeObservable.prototype.subscribeCore = function (o) {
var self = this;
var groupDisposable,
nextShift = self._timeShift,
nextSpan = self._timeSpan,
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var inherits = __webpack_require__(6);
Similar blocks of code found in 2 locations. Consider refactoring.
RepeatWhenObservable.prototype.subscribeCore = function (o) {
var completions = new Subject(),
notifier = new Subject(),
handled = this._notifier(completions),
notificationDisposable = handled.subscribe(notifier);
Similar blocks of code found in 2 locations. Consider refactoring.
CatchErrorWhenObservable.prototype.subscribeCore = function (o) {
var exceptions = new Subject(),
notifier = new Subject(),
handled = this._notifier(exceptions),
notificationDisposable = handled.subscribe(notifier);
Similar blocks of code found in 2 locations. Consider refactoring.
DelaySelectorObseravble.prototype.subscribeCore = function (o) {
var delays = new CompositeDisposable(),
atEnd = false,
subscription = new SerialDisposable(),
selector = this._selector,
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Observer = __webpack_require__(1);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Scheduler = __webpack_require__(12);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Identical blocks of code found in 2 locations. Consider refactoring.
MockPromise.prototype.then = function (onResolved, onRejected) {
var self = this;
this.subscriptions.push(new Subscription(this.scheduler.clock));
var index = this.subscriptions.length - 1;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function observableWindowWithClosingSelector(source, windowClosingSelector) {
return new AnonymousObservable(function (o) {
var m = new SerialDisposable(),
d = new CompositeDisposable(m),
r = new RefCountDisposable(d),
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Identical blocks of code found in 2 locations. Consider refactoring.
DelayRelativeObserver.prototype.next = function (notification) {
var shouldRun;
if (notification.value.kind === 'E') {
this._s.q = [];
this._s.q.push(notification);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var noop = __webpack_require__(3);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Identical blocks of code found in 2 locations. Consider refactoring.
function scheduleRelative(state, recurse) {
if (state.error) {
return;
}
state.running = true;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Disposable = __webpack_require__(13);
Similar blocks of code found in 2 locations. Consider refactoring.
function observableWindowWithBoundaries(source, windowBoundaries) {
return new AnonymousObservable(function (o) {
var win = new Subject(),
d = new CompositeDisposable(),
r = new RefCountDisposable(d);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
ColdObservable.prototype._subscribe = function (o) {
var message,
notification,
observable = this;
this.subscriptions.push(new Subscription(this.scheduler.clock));
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var fromArray = __webpack_require__(53);
Similar blocks of code found in 2 locations. Consider refactoring.
TestScheduler.prototype.startScheduler = function (createFn, settings) {
settings || (settings = {});
settings.created == null && (settings.created = ReactiveTest.created);
settings.subscribed == null && (settings.subscribed = ReactiveTest.subscribed);
settings.disposed == null && (settings.disposed = ReactiveTest.disposed);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
WithLatestFromObservable.prototype.subscribeCore = function (o) {
var len = this._ss.length;
var state = {
hasValue: initializeArray(len, falseFactory),
hasValueAll: false,
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Identical blocks of code found in 2 locations. Consider refactoring.
return (function(modules) {
var installedModules = {};
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
function SerialDisposable() {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var map = __webpack_require__(195);
Similar blocks of code found in 2 locations. Consider refactoring.
SequenceEqualObservable.prototype.subscribeCore = function (o) {
(isArrayLike(this._first) || isIterable(this._first)) && (this._first = fromArray(this._first));
isPromise(this._first) && (this._first = fromPromise(this._first));
(isArrayLike(this._second) || isIterable(this._second)) && (this._second = fromArray(this._second));
Similar blocks of code found in 2 locations. Consider refactoring.
WhenObservable.prototype.subscribeCore = function (o) {
var activePlans = [],
externalSubscriptions = new global.Map(),
outObserver = new WhenObserver(externalSubscriptions, o);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Observable = __webpack_require__(8);
Similar blocks of code found in 2 locations. Consider refactoring.
function HotObservable(scheduler, messages) {
Observable.call(this);
var message,
notification,
observable = this;
Similar blocks of code found in 4 locations. Consider refactoring.
SecondObserver.prototype.next = function (x) {
if (this._s.ql.length > 0) {
var v = this._s.ql.shift();
var equal = tryCatch(this._s.cmp)(v, x);
if (equal === errorObj) {
Similar blocks of code found in 4 locations. Consider refactoring.
FirstObserver.prototype.next = function (x) {
if (this._s.qr.length > 0) {
var v = this._s.qr.shift();
var equal = tryCatch(this._s.cmp)(v, x);
if (equal === errorObj) {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
function SingleAssignmentDisposable() {
Similar blocks of code found in 2 locations. Consider refactoring.
VirtualTimeSchedulerPrototype.advanceTo = function (time) {
var dueToClock = this.comparer(this.clock, time);
if (this.comparer(this.clock, time) > 0) {
throw new errors.ArgumentOutOfRangeError();
}
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
function MockPromise(scheduler, messages) {
var self = this;
this.scheduler = scheduler;
this.messages = messages;
this.subscriptions = [];
Similar blocks of code found in 2 locations. Consider refactoring.
ForkJoinObservable.prototype.subscribeCore = function (o) {
if (this._sources.length === 0) {
o.onCompleted();
return Disposable.empty;
}
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AbstractObserver = __webpack_require__(5);
Similar blocks of code found in 2 locations. Consider refactoring.
ZipIterableObservable.prototype.subscribeCore = function (o) {
var sources = this._sources,
len = sources.length,
subscriptions = new Array(len);
Similar blocks of code found in 2 locations. Consider refactoring.
function next(state, x, i) {
state.values[i] = x;
state.hasValue[i] = true;
if (state.hasValueAll || (state.hasValueAll = state.hasValue.every(identity))) {
if (state.err) {
Identical blocks of code found in 2 locations. Consider refactoring.
WindowCountObserver.prototype.next = function (x) {
for (var i = 0, len = this._s.q.length; i < len; i++) {
this._s.q[i].onNext(x);
}
var c = this._s.n - this._s.count + 1;
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
if (typeof Object.create === 'function') {
module.exports = function inherits(ctor, superCtor) {
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var isFunction = __webpack_require__(9);
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = {
created: 100,
subscribed: 200,
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
function BinaryDisposable(first, second) {
Identical blocks of code found in 2 locations. Consider refactoring.
HotObservable.prototype._subscribe = function (o) {
var observable = this;
this.observers.push(o);
this.subscriptions.push(new Subscription(this.scheduler.clock));
var index = this.subscriptions.length - 1;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
module.exports = function bindCallback(func, thisArg, argCount) {
Similar blocks of code found in 2 locations. Consider refactoring.
function scheduleMethod(state, recurse) {
if (state.isDisposed) {
return;
}
var currentItem = state.e.next();
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function timer(dueTime, periodOrScheduler, scheduler) {
var period;
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
if (periodOrScheduler != null && typeof periodOrScheduler === 'number') {
period = periodOrScheduler;
Similar blocks of code found in 4 locations. Consider refactoring.
FirstObserver.prototype.completed = function () {
this._s.donel = true;
if (this._s.ql.length === 0) {
if (this._s.qr.length > 0) {
this._s.o.onNext(false);
Similar blocks of code found in 4 locations. Consider refactoring.
SecondObserver.prototype.completed = function () {
this._s.doner = true;
if (this._s.qr.length === 0) {
if (this._s.ql.length > 0) {
this._s.o.onNext(false);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var multicast = __webpack_require__(58);
Identical blocks of code found in 2 locations. Consider refactoring.
PausableBufferedObserver.prototype.next = function (x) {
if (this._previousShouldFire !== null && x.shouldFire !== this._previousShouldFire) {
this._previousShouldFire = x.shouldFire;
if (x.shouldFire) {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
function NAryDisposable(disposables) {
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function toAsync(func, context, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return function asyncFn() {
var subject = new AsyncSubject(),
len = arguments.length,
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function delay() {
var source = arguments[0],
firstArg = arguments[1];
if (typeof firstArg === 'number' || firstArg instanceof Date) {
var dueTime = firstArg,
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
module.exports = function addProperties() {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
function InnerSubscription(s, o) {
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function first() {
var obj = {},
source = arguments[0];
if (typeof arguments[1] === 'object') {
obj = arguments[1];
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function last() {
var obj = {},
source = arguments[0];
if (typeof arguments[1] === 'object') {
obj = arguments[1];
Similar blocks of code found in 2 locations. Consider refactoring.
function scheduleTimerPeriod(state, recurse) {
if (state.p > 0) {
var now = state.scheduler.now();
state.dt = new Date(state.dt.getTime() + state.p);
state.dt.getTime() <= now && (state.dt = new Date(now + state.p));
Identical blocks of code found in 2 locations. Consider refactoring.
PausableObservable.prototype._subscribe = function (o) {
var conn = publish(this.source),
subscription = conn.subscribe(o),
connection = Disposable.empty;
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function startWith() {
var source = arguments[0],
scheduler,
start = 1;
if (Scheduler.isScheduler(arguments[1])) {
Similar blocks of code found in 2 locations. Consider refactoring.
function ControlledSubject(enableQueue, scheduler) {
enableQueue == null && (enableQueue = true);
this.subject = new Subject();
this.enableQueue = enableQueue;
this.queue = enableQueue ? [] : null;
Similar blocks of code found in 2 locations. Consider refactoring.
function scheduleMethod(state, recurse) {
if (state.isDisposed) {
return;
}
var currentItem = state.e.next();
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function (source, count, skip) {
+count || (count = 0);
Math.abs(count) === Infinity && (count = 0);
if (count <= 0) {
throw new ArgumentOutOfRangeError();
Identical blocks of code found in 2 locations. Consider refactoring.
TakeLastBufferWithTimeObserver.prototype.completed = function () {
var now = this._s.now(),
res = [];
while (this._q.length > 0) {
var next = this._q.shift();
src/modular/observable/takelastbufferwithtime.js on lines 30..38 Identical blocks of code found in 2 locations. Consider refactoring.
JoinObserver.prototype.next = function (notification) {
if (!this.isDisposed) {
if (notification.kind === 'E') {
return this._onError(notification.error);
}
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
(function(global) {'use strict';
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
(function(global) {'use strict';
module.exports = function toPromise(source, promiseCtor) {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var ObservableBase = __webpack_require__(11);
Similar blocks of code found in 2 locations. Consider refactoring.
AmbObservable.prototype.subscribeCore = function (o) {
var state = {
choice: null,
leftSubscription: new SingleAssignmentDisposable(),
rightSubscription: new SingleAssignmentDisposable()
Identical blocks of code found in 2 locations. Consider refactoring.
DelayRelativeObservable.prototype.subscribeCore = function (o) {
var state = {
active: false,
cancelable: new SerialDisposable(),
error: null,
Identical blocks of code found in 2 locations. Consider refactoring.
WindowCountObservable.prototype.subscribeCore = function (o) {
var m = new SingleAssignmentDisposable(),
refCountDisposable = new RefCountDisposable(m);
var state = {
Identical blocks of code found in 2 locations. Consider refactoring.
function ActivePlan(joinObserverArray, onNext, onCompleted) {
this._joinObserverArray = joinObserverArray;
this._onNext = onNext;
this._onCompleted = onCompleted;
this._joinObservers = new global.Map();
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function withLatestFrom() {
var len = arguments.length,
args = new Array(len);
for (var i = 0; i < len; i++) {
args[i] = arguments[i];
Similar blocks of code found in 4 locations. Consider refactoring.
function repeat(value, count) {
count == null && (count = -1);
return {
'@@iterator': function () {
return {
Similar blocks of code found in 4 locations. Consider refactoring.
function repeatValue(value, count) {
count == null && (count = -1);
return {
'@@iterator': function () {
return {
Identical blocks of code found in 2 locations. Consider refactoring.
ThrottleObserver.prototype.next = function (x) {
var now = this._s.scheduler.now();
if (this._s.lastOnNext === 0 || now - this._s.lastOnNext >= this._s.duration) {
this._s.lastOnNext = now;
this._s.o.onNext(x);
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function (source, timeSpan, timeShiftOrScheduler, scheduler) {
var timeShift;
timeShiftOrScheduler == null && (timeShift = timeSpan);
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
if (typeof timeShiftOrScheduler === 'number') {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Scheduler = __webpack_require__(12);
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
module.exports = function () {
Similar blocks of code found in 2 locations. Consider refactoring.
Notification.prototype.toObservable = function (scheduler) {
var self = this;
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.immediate);
return new AnonymousObservable(function (o) {
return scheduler.schedule(self, function (_, notification) {
Identical blocks of code found in 2 locations. Consider refactoring.
CombineLatestObservable.prototype.subscribeCore = function (o) {
var state = {
hasValue: [false, false],
hasValueAll: false,
isDone: false,
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var multicast = __webpack_require__(58);
Similar blocks of code found in 2 locations. Consider refactoring.
function createCase(selector, sources, defaultSourceOrScheduler) {
return function () {
isPromise(defaultSourceOrScheduler) && (defaultSourceOrScheduler = fromPromise(defaultSourceOrScheduler));
defaultSourceOrScheduler || (defaultSourceOrScheduler = empty());
Identical blocks of code found in 2 locations. Consider refactoring.
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var Subject = __webpack_require__(57);
Identical blocks of code found in 2 locations. Consider refactoring.
function PausableBufferedObservable(source, pauser) {
this.source = source;
this.controller = new Subject();
this.paused = true;
Identical blocks of code found in 2 locations. Consider refactoring.
CatchErrorObservable.prototype.subscribeCore = function (o) {
var subscription = new SerialDisposable();
var state = {
isDisposed: false,
e: this.sources[$iterator$](),
Similar blocks of code found in 2 locations. Consider refactoring.
SwitchFirstObservable.prototype.subscribeCore = function (o) {
var m = new SingleAssignmentDisposable(),
g = new CompositeDisposable(),
state = {
hasCurrent: false,
Identical blocks of code found in 2 locations. Consider refactoring.
ConcatObservable.prototype.subscribeCore = function (o) {
var subscription = new SerialDisposable();
var state = {
isDisposed: false,
o: o,
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var fromArray = __webpack_require__(53);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AsyncSubject = __webpack_require__(31);
Identical blocks of code found in 2 locations. Consider refactoring.
WindowTimeObserver.prototype.error = function (e) {
for (var i = 0, len = this._state.q.length; i < len; i++) {
this._state.q[i].onError(e);
}
this._state.o.onError(e);
Identical blocks of code found in 2 locations. Consider refactoring.
function DelaySelectorObseravble(source, subscriptionDelay, delayDurationSelector) {
this.source = source;
this._selector = null;
this._subDelay = null;
if (isFunction(subscriptionDelay)) {
Similar blocks of code found in 2 locations. Consider refactoring.
VirtualTimeSchedulerPrototype.advanceBy = function (time) {
var dt = this.add(this.clock, time),
dueToClock = this.comparer(this.clock, dt);
if (dueToClock > 0) {
throw new errors.ArgumentOutOfRangeError();
Identical blocks of code found in 2 locations. Consider refactoring.
function scheduleMethod(s, state) {
var result = tryCatch(state.func).apply(state.context, state.args);
if (result === errorObj) {
return state.subject.onError(result.e);
}
Similar blocks of code found in 2 locations. Consider refactoring.
WindowedObserver.prototype.next = function (value) {
this.observer.onNext(value);
this.received = ++this.received % this.observable.windowSize;
this.received === 0 && (this.scheduleDisposable = this.scheduler.schedule(this, innerScheduleMethod));
};
Similar blocks of code found in 2 locations. Consider refactoring.
Defer.prototype.subscribeCore = function (o) {
var result = tryCatch(this._f)();
if (result === errorObj) {
return throwError(result.e).subscribe(o);
}
Identical blocks of code found in 2 locations. Consider refactoring.
function PausableObservable(source, pauser) {
this.source = source;
this.controller = new Subject();
if (pauser && pauser.subscribe) {
Identical blocks of code found in 2 locations. Consider refactoring.
WindowTimeObserver.prototype.completed = function () {
for (var i = 0, len = this._state.q.length; i < len; i++) {
this._state.q[i].onCompleted();
}
this._state.o.onCompleted();
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function ofscheduled() {
var len = arguments.length,
args = new Array(len - 1),
scheduler = arguments[0];
for (var i = 1; i < len; i++) {
Similar blocks of code found in 4 locations. Consider refactoring.
LastIndexOfObservable.prototype.subscribeCore = function (o) {
if (this._n < 0) {
o.onNext(-1);
o.onCompleted();
return Disposable.empty;
Similar blocks of code found in 4 locations. Consider refactoring.
IndexOfObservable.prototype.subscribeCore = function (o) {
if (this._n < 0) {
o.onNext(-1);
o.onCompleted();
return Disposable.empty;
Identical blocks of code found in 2 locations. Consider refactoring.
IncludesObservable.prototype.subscribeCore = function (o) {
if (this._n < 0) {
o.onNext(false);
o.onCompleted();
return Disposable.empty;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
module.exports = function cloneArray(arr) {
Identical blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var noop = __webpack_require__(3);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var flatMap = __webpack_require__(145);
Identical blocks of code found in 2 locations. Consider refactoring.
function TakeLastObserver(o, c, s, ss, ls) {
this._o = o;
this._c = c;
this._s = s;
this._ls = ls;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var flatMap = __webpack_require__(145);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AnonymousObservable = __webpack_require__(36);
Identical blocks of code found in 2 locations. Consider refactoring.
function WindowedObserver(observer, observable, scheduler, cancel) {
this.observer = observer;
this.observable = observable;
this.scheduler = scheduler;
this.cancel = cancel;
Identical blocks of code found in 2 locations. Consider refactoring.
function scheduleRecursive(state, recurse) {
if (state.n === 0) {
return state.o.onCompleted();
}
if (state.n > 0) {
Identical blocks of code found in 2 locations. Consider refactoring.
WindowCountObserver.prototype.error = function (e) {
while (this._s.q.length > 0) {
this._s.q.shift().onError(e);
}
this._s.o.onError(e);
Similar blocks of code found in 2 locations. Consider refactoring.
OnErrorResumeNextObservable.prototype.subscribeCore = function (o) {
var subscription = new SerialDisposable(),
state = {
pos: 0,
subscription: subscription,
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function reduce() {
var hasSeed = false,
seed,
source = arguments[0],
accumulator = arguments[1];
Identical blocks of code found in 2 locations. Consider refactoring.
TakeLastObservable.prototype.subscribeCore = function (o) {
var subscription = new SingleAssignmentDisposable();
var loopSubscription = new SingleAssignmentDisposable();
subscription.setDisposable(this.source.subscribe(new TakeLastObserver(o, this.count, this.scheduler, subscription, loopSubscription)));
Similar blocks of code found in 2 locations. Consider refactoring.
CatchObservable.prototype.subscribeCore = function (o) {
var d1 = new SingleAssignmentDisposable(),
subscription = new SerialDisposable();
subscription.setDisposable(d1);
d1.setDisposable(this.source.subscribe(new CatchObserver(o, subscription, this._fn)));
Identical blocks of code found in 2 locations. Consider refactoring.
TimerPeriodObservable.prototype.subscribeCore = function (o) {
var state = {
o: o,
i: 0,
p: this._period,
Similar blocks of code found in 2 locations. Consider refactoring.
VirtualTimeSchedulerPrototype.sleep = function (time) {
var dt = this.add(this.clock, time);
if (this.comparer(this.clock, dt) >= 0) {
throw new errors.ArgumentOutOfRangeError();
}
Identical blocks of code found in 2 locations. Consider refactoring.
WindowCountObserver.prototype.completed = function () {
while (this._s.q.length > 0) {
this._s.q.shift().onCompleted();
}
this._s.o.onCompleted();
Identical blocks of code found in 2 locations. Consider refactoring.
WindowTimeObserver.prototype.next = function (x) {
for (var i = 0, len = this._state.q.length; i < len; i++) {
this._state.q[i].onNext(x);
}
};
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function slice(source, begin, end) {
var start = begin || 0;
if (start < 0) {
throw new ArgumentOutOfRangeError();
}
Similar blocks of code found in 4 locations. Consider refactoring.
WindowedObservable.prototype._subscribe = function (o) {
this.subscription = this.source.subscribe(new WindowedObserver(o, this, this.scheduler, this.subscription));
return new BinaryDisposable(this.subscription, this.scheduler.schedule(this, scheduleMethod));
};
Similar blocks of code found in 4 locations. Consider refactoring.
StopAndWaitObservable.prototype._subscribe = function (o) {
this.subscription = this.source.subscribe(new StopAndWaitObserver(o, this, this.scheduler, this.subscription));
return new BinaryDisposable(this.subscription, this.scheduler.schedule(this, scheduleMethod));
};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function throttle(source, windowDuration, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
var duration = +windowDuration || 0;
if (duration <= 0) {
throw new RangeError('windowDuration cannot be less or equal zero.');
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var maxBy = __webpack_require__(197);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var minBy = __webpack_require__(201);
Similar blocks of code found in 2 locations. Consider refactoring.
function AmbObservable(leftSource, rightSource) {
isPromise(leftSource) && (leftSource = fromPromise(leftSource));
isPromise(rightSource) && (rightSource = fromPromise(rightSource));
this._l = leftSource;
Identical blocks of code found in 2 locations. Consider refactoring.
function loopRecursive(state, recurse) {
if (state[1].length > 0) {
state[0].onNext(state[1].shift());
recurse(state);
} else {
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function controlled(source, enableQueue, scheduler) {
if (enableQueue && Scheduler.isScheduler(enableQueue)) {
scheduler = enableQueue;
enableQueue = true;
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function amb() {
var acc = never();
for (var i = 0, len = arguments.length; i < len; i++) {
acc = new AmbObservable(acc, arguments[i]);
}
Identical blocks of code found in 2 locations. Consider refactoring.
SourceObserver.prototype.error = function (e) {
if (this._s.values[1]) {
this._s.o.onError(e);
} else {
this._s.err = e;
Identical blocks of code found in 2 locations. Consider refactoring.
function StopAndWaitObserver(observer, observable, scheduler, cancel) {
this.observer = observer;
this.observable = observable;
this.scheduler = scheduler;
this.cancel = cancel;
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var FlatMapObservable = __webpack_require__(146);
Identical blocks of code found in 2 locations. Consider refactoring.
JoinObserver.prototype.dispose = function () {
AbstractObserver.prototype.dispose.call(this);
if (!this.isDisposed) {
this.isDisposed = true;
this._subscription.dispose();
Identical blocks of code found in 2 locations. Consider refactoring.
JoinObserver.prototype.removeActivePlan = function (activePlan) {
this._activePlans.splice(this._activePlans.indexOf(activePlan), 1);
this._activePlans.length === 0 && this.dispose();
};
Identical blocks of code found in 2 locations. Consider refactoring.
TakeLastObserver.prototype.completed = function () {
this._ss.dispose();
this._ls.setDisposable(this._s.scheduleRecursive([this._o, this._q], loopRecursive));
};
Similar blocks of code found in 2 locations. Consider refactoring.
DelaySubscription.prototype.subscribeCore = function (o) {
var d = new SerialDisposable();
d.setDisposable(this._s.scheduleFuture([this.source, o, d], this._dt, scheduleMethod));
return d;
};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function sample(source, intervalOrSampler, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return typeof intervalOrSampler === 'number' ? new SampleObservable(source, interval(intervalOrSampler, scheduler)) : new SampleObservable(source, intervalOrSampler);
};
Identical blocks of code found in 2 locations. Consider refactoring.
DelayAbsoluteObservable.prototype.subscribe = function (o) {
var obs = new DelayRelativeObservable(this.source, this._dueTime - this._scheduler.now(), this._scheduler);
return obs.subscribe(o);
};
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function window(source, windowOpeningsOrClosingSelector, windowClosingSelector) {
if (!windowClosingSelector && !isFunction(windowOpeningsOrClosingSelector)) {
return observableWindowWithBoundaries(source, windowOpeningsOrClosingSelector);
}
return isFunction(windowOpeningsOrClosingSelector) ? observableWindowWithClosingSelector(source, windowOpeningsOrClosingSelector) : observableWindowWithOpenings(source, windowOpeningsOrClosingSelector, windowClosingSelector);
Similar blocks of code found in 3 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var FlatMapObservable = __webpack_require__(146);
Similar blocks of code found in 3 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var FlatMapObservable = __webpack_require__(146);
Identical blocks of code found in 2 locations. Consider refactoring.
function transformForObserver(o) {
return {
'@@transducer/init': function () {
return o;
},
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function partition(source, predicate, thisArg) {
var fn = bindCallback(predicate, thisArg, 3);
return [filter(source, predicate, thisArg), filter(source, function (x, i, o) {
return !fn(x, i, o);
})];
Identical blocks of code found in 2 locations. Consider refactoring.
SourceObserver.prototype.completed = function () {
this._s.isDone = true;
this._s.values[1] && this._s.o.onCompleted();
};
Identical blocks of code found in 2 locations. Consider refactoring.
ThrottleObservable.prototype.subscribeCore = function (o) {
return this.source.subscribe(new ThrottleObserver({
o: o,
duration: this._duration,
scheduler: this._scheduler,
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function takeLast(source, count, scheduler) {
if (count < 0) {
throw new ArgumentOutOfRangeError();
}
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.queue);
Identical blocks of code found in 2 locations. Consider refactoring.
RepeatValueObservable.prototype.subscribeCore = function (o) {
var state = {
value: this._value,
n: this._count,
o: o
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function indexOf(source, searchElement, fromIndex) {
var n = +fromIndex || 0;
Math.abs(n) === Infinity && (n = 0);
return new IndexOfObservable(source, searchElement, n);
};
Identical blocks of code found in 2 locations. Consider refactoring.
WhenObserver.prototype.error = function (e) {
this._map.forEach(function (v) {
v.onError(e);
});
this._o.onError(e);
Similar blocks of code found in 2 locations. Consider refactoring.
function timerRelativeAndPeriod(dt, period, scheduler) {
if (dt === period) {
return interval(dt, scheduler);
}
return defer(function () {
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function lastIndexOf(source, searchElement, fromIndex) {
var n = +fromIndex || 0;
Math.abs(n) === Infinity && (n = 0);
return new LastIndexOfObservable(source, searchElement, n);
};
Identical blocks of code found in 2 locations. Consider refactoring.
function arrayIndexOfComparer(array, item, comparer) {
for (var i = 0, len = array.length; i < len; i++) {
if (comparer(array[i], item)) {
return i;
}
Identical blocks of code found in 2 locations. Consider refactoring.
function ControlledObservable(source, enableQueue, scheduler) {
this.subject = new ControlledSubject(enableQueue, scheduler);
this.source = multicast(source, this.subject).refCount();
Observable.call(this);
}
Identical blocks of code found in 2 locations. Consider refactoring.
PausableBufferedObservable.prototype._subscribe = function (o) {
return combineLatestSource(this.source, distinctUntilChanged(startWith(this.pauser, !this.paused)), selectorFn).subscribe(new PausableBufferedObserver(o));
};
Identical blocks of code found in 2 locations. Consider refactoring.
PausableBufferedObserver.prototype.drainQueue = function () {
while (this._q.length > 0) {
this._o.onNext(this._q.shift());
}
};
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
module.exports = function comparer(x, y) {
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var isSymbol = __webpack_require__(115);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var isIterable = __webpack_require__(117);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var replay = __webpack_require__(217);
Similar blocks of code found in 8 locations. Consider refactoring.
LeftObserver.prototype.next = function (x) {
choiceL(this._s);
this._s.choice === LEFT_CHOICE && this._o.onNext(x);
};
Identical blocks of code found in 2 locations. Consider refactoring.
function TimerPeriodObservable(dt, period, scheduler) {
this._dt = dt;
this._period = Scheduler.normalize(period);
this._scheduler = scheduler;
ObservableBase.call(this);
Similar blocks of code found in 8 locations. Consider refactoring.
RightObserver.prototype.next = function (x) {
choiceR(this._s);
this._s.choice === RIGHT_CHOICE && this._o.onNext(x);
};
Similar blocks of code found in 8 locations. Consider refactoring.
LeftObserver.prototype.error = function (e) {
choiceL(this._s);
this._s.choice === LEFT_CHOICE && this._o.onError(e);
};
Similar blocks of code found in 8 locations. Consider refactoring.
RightObserver.prototype.error = function (e) {
choiceR(this._s);
this._s.choice === RIGHT_CHOICE && this._o.onError(e);
};
Identical blocks of code found in 2 locations. Consider refactoring.
function FindValueObservable(source, cb, thisArg, yieldIndex) {
this.source = source;
this._cb = bindCallback(cb, thisArg, 3);
this._yieldIndex = yieldIndex;
ObservableBase.call(this);
src/modular/observable/_findvalueobservable.js on lines 41..46 Similar blocks of code found in 4 locations. Consider refactoring.
LeftObserver.prototype.completed = function () {
choiceL(this._s);
this._s.choice === LEFT_CHOICE && this._o.onCompleted();
};
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function startAsync(functionAsync) {
var promise = tryCatch(functionAsync)();
if (promise === errorObj) {
return throwError(promise.e);
}
Similar blocks of code found in 4 locations. Consider refactoring.
RightObserver.prototype.completed = function () {
choiceR(this._s);
this._s.choice === RIGHT_CHOICE && this._o.onCompleted();
};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function generateRelative(initialState, condition, iterate, resultSelector, timeSelector, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new GenerateRelativeObservable(initialState, condition, iterate, resultSelector, timeSelector, scheduler);
};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function generateAbsolute(initialState, condition, iterate, resultSelector, timeSelector, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new GenerateAbsoluteObservable(initialState, condition, iterate, resultSelector, timeSelector, scheduler);
};
Identical blocks of code found in 2 locations. Consider refactoring.
TransduceObservable.prototype.subscribeCore = function (o) {
var xform = this._transducer(transformForObserver(o));
return this.source.subscribe(new TransduceObserver(o, xform));
};
Identical blocks of code found in 2 locations. Consider refactoring.
StopAndWaitObserver.prototype.next = function (value) {
this.observer.onNext(value);
this.scheduleDisposable = this.scheduler.schedule(this, innerScheduleMethod);
};
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var publishValue = __webpack_require__(212);
Identical blocks of code found in 2 locations. Consider refactoring.
MaterializeObserver.prototype.error = function (e) {
this._o.onNext(Notification.createOnError(e));this._o.onCompleted();
};
Identical blocks of code found in 2 locations. Consider refactoring.
function createWindow(state) {
var s = new Subject();
state.q.push(s);
state.o.onNext(addRef(s, state.refCountDisposable));
}
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var $iterator$ = __webpack_require__(51);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var isFunction = __webpack_require__(9);
Similar blocks of code found in 4 locations. Consider refactoring.
MockObserver.prototype.onNext = function (value) {
this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnNext(value)));
};
Similar blocks of code found in 4 locations. Consider refactoring.
MockObserver.prototype.onError = function (e) {
this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnError(e)));
};
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var publish = __webpack_require__(56);
Identical blocks of code found in 2 locations. Consider refactoring.
MaterializeObserver.prototype.completed = function () {
this._o.onNext(Notification.createOnCompleted());this._o.onCompleted();
};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function bufferCount(source, count, skip) {
typeof skip !== 'number' && (skip = count);
return filter(flatMap(windowCount(source, count, skip), toArray), notEmpty);
};
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var AnonymousObservable = __webpack_require__(36);
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function generate(initialState, condition, iterate, resultSelector, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.queue);
return new GenerateObservable(initialState, condition, iterate, resultSelector, scheduler);
};
Similar blocks of code found in 6 locations. Consider refactoring.
module.exports = function takeUntilWithTime(source, endTime, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new TakeUntilWithTimeObservable(source, endTime, scheduler);
};
Similar blocks of code found in 6 locations. Consider refactoring.
module.exports = function takeLastBufferWithTime(source, duration, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new TakeLastBufferWithTimeObservable(source, duration, scheduler);
};
Similar blocks of code found in 6 locations. Consider refactoring.
module.exports = function takeLastWithTime(source, duration, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new TakeLastWithTimeObservable(source, duration, scheduler);
};
Similar blocks of code found in 6 locations. Consider refactoring.
module.exports = function skipUntilWithTime(source, startTime, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new SkipUntilWithTimeObservable(source, startTime, scheduler);
};
Similar blocks of code found in 6 locations. Consider refactoring.
module.exports = function skipLastWithTime(source, duration, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new SkipLastWithTimeObservable(source, duration, scheduler);
};
Similar blocks of code found in 6 locations. Consider refactoring.
module.exports = function repeatValue(value, repeatCount, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.queue);
return new RepeatValueObservable(value, repeatCount, scheduler);
};
Identical blocks of code found in 2 locations. Consider refactoring.
MockObserver.prototype.onCompleted = function () {
this.messages.push(new Recorded(this.scheduler.clock, Notification.createOnCompleted()));
};
Identical blocks of code found in 2 locations. Consider refactoring.
FindValueObservable.prototype.subscribeCore = function (o) {
return this.source.subscribe(new FindValueObserver(o, this.source, this._cb, this._yieldIndex));
};
src/modular/observable/_findvalueobservable.js on lines 50..52 Identical blocks of code found in 2 locations. Consider refactoring.
function MockDisposable(scheduler) {
this.scheduler = scheduler;
this.disposes = [];
this.disposes.push(this.scheduler.clock);
}
src/modular/testing/mockdisposable.js on lines 3..7 Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var FindValueObservable = __webpack_require__(180);
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var FindValueObservable = __webpack_require__(180);
Identical blocks of code found in 2 locations. Consider refactoring.
function PausableBufferedObserver(o) {
this._o = o;
this._q = [];
this._previousShouldFire = null;
AbstractObserver.call(this);
Similar blocks of code found in 2 locations. Consider refactoring.
TestScheduler.prototype.createResolvedPromise = function (ticks, value) {
return new MockPromise(this, [ReactiveTest.onNext(ticks, value), ReactiveTest.onCompleted(ticks)]);
};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function average(source, keySelector, thisArg) {
var fn;
isFunction(keySelector) && (fn = bindCallback(keySelector, thisArg, 3));
return new AverageObservable(source, fn);
};
Similar blocks of code found in 2 locations. Consider refactoring.
ControlledObservable.prototype.windowed = function (windowSize, scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new WindowedObservable(this, windowSize, scheduler);
};
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function toMap(source, keySelector, elementSelector) {
if (typeof global.Map === 'undefined') {
throw new TypeError();
}
return new ToMapObservable(source, keySelector, elementSelector);
Similar blocks of code found in 2 locations. Consider refactoring.
ControlledObservable.prototype.stopAndWait = function (scheduler) {
Scheduler.isScheduler(scheduler) || (scheduler = Scheduler.async);
return new StopAndWaitObservable(this, scheduler);
};
Similar blocks of code found in 2 locations. Consider refactoring.
function Recorded(time, value, comparer) {
this.time = time;
this.value = value;
this.comparer = comparer || isEqual;
}
Identical blocks of code found in 10 locations. Consider refactoring.
function repeat(value) {
return {
'@@iterator': function () {
return {
next: function () {
Identical blocks of code found in 10 locations. Consider refactoring.
function repeat(value) {
return {
'@@iterator': function () {
return {
next: function () {
Identical blocks of code found in 2 locations. Consider refactoring.
JoinObserver.prototype.subscribe = function () {
this._subscription.setDisposable(materialize(this._source).subscribe(this));
};
Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
var mergeConcat = __webpack_require__(163);
Identical blocks of code found in 2 locations. Consider refactoring.
SubjectObserver.prototype.completed = function () {
this._s.isDone = true;
next(this._s, true, 1);
};
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function toSet(source) {
if (typeof global.Set === 'undefined') {
throw new TypeError();
}
return new ToSetObservable(source);
Similar blocks of code found in 3 locations. Consider refactoring.
Recorded.prototype.toString = function () {
return this.value.toString() + '@' + this.time;
};
Similar blocks of code found in 2 locations. Consider refactoring.
this.__redo__.forEach(function (redo, i) {
if (redo >= index) this.__redo__[i] = ++redo;
}, this);
Similar blocks of code found in 2 locations. Consider refactoring.
this.__redo__.forEach(function (redo, i) {
if (redo > index) this.__redo__[i] = --redo;
}, this);
Similar blocks of code found in 4 locations. Consider refactoring.
function choiceR(state) {
if (!state.choice) {
state.choice = RIGHT_CHOICE;
state.leftSubscription.dispose();
}
Similar blocks of code found in 4 locations. Consider refactoring.
function choiceL(state) {
if (!state.choice) {
state.choice = LEFT_CHOICE;
state.rightSubscription.dispose();
}
Identical blocks of code found in 2 locations. Consider refactoring.
PausableBufferedObserver.prototype.error = function (e) {
this.drainQueue();
this._o.onError(e);
};
Similar blocks of code found in 4 locations. Consider refactoring.
PausableBufferedObservable.prototype.resume = function () {
this.controller.onNext(true);
this.paused = false;
};
Similar blocks of code found in 4 locations. Consider refactoring.
PausableBufferedObservable.prototype.pause = function () {
this.controller.onNext(false);
this.paused = true;
};
Identical blocks of code found in 2 locations. Consider refactoring.
module.exports = function firstOnly(x) {
if (x.length === 0) {
throw new EmptyError();
}
return x[0];
src/modular/observable/_firstonly.js on lines 5..8 Similar blocks of code found in 2 locations. Consider refactoring.
function(module, exports) {
'use strict';
module.exports = function isArrayLike(o) {
Similar blocks of code found in 4 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(103)()
Similar blocks of code found in 4 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(90)()
Similar blocks of code found in 4 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(93)()
Similar blocks of code found in 4 locations. Consider refactoring.
function(module, exports, __webpack_require__) {
'use strict';
module.exports = __webpack_require__(100)()
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function skipLast(source, count) {
count < 0 && (count = 0);
return new SkipLastObservable(source, count);
};
Similar blocks of code found in 2 locations. Consider refactoring.
module.exports = function takeLastBuffer(source, count) {
count < 0 && (count = 0);
return new TakeLastBufferObservable(source, count);
};
Similar blocks of code found in 2 locations. Consider refactoring.
TestScheduler.prototype.createRejectedPromise = function (ticks, reason) {
return new MockPromise(this, [ReactiveTest.onError(ticks, reason)]);
};
There are no issues that match your filters.