PATH:
usr
/
local
/
lib
/
node_modules
/
ghost-cli
/
node_modules
/
rxjs
/
internal
/
operators
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); } return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var Subscription_1 = require("../Subscription"); var subscribeToResult_1 = require("../util/subscribeToResult"); var OuterSubscriber_1 = require("../OuterSubscriber"); function bufferToggle(openings, closingSelector) { return function bufferToggleOperatorFunction(source) { return source.lift(new BufferToggleOperator(openings, closingSelector)); }; } exports.bufferToggle = bufferToggle; var BufferToggleOperator = (function () { function BufferToggleOperator(openings, closingSelector) { this.openings = openings; this.closingSelector = closingSelector; } BufferToggleOperator.prototype.call = function (subscriber, source) { return source.subscribe(new BufferToggleSubscriber(subscriber, this.openings, this.closingSelector)); }; return BufferToggleOperator; }()); var BufferToggleSubscriber = (function (_super) { __extends(BufferToggleSubscriber, _super); function BufferToggleSubscriber(destination, openings, closingSelector) { var _this = _super.call(this, destination) || this; _this.openings = openings; _this.closingSelector = closingSelector; _this.contexts = []; _this.add(subscribeToResult_1.subscribeToResult(_this, openings)); return _this; } BufferToggleSubscriber.prototype._next = function (value) { var contexts = this.contexts; var len = contexts.length; for (var i = 0; i < len; i++) { contexts[i].buffer.push(value); } }; BufferToggleSubscriber.prototype._error = function (err) { var contexts = this.contexts; while (contexts.length > 0) { var context_1 = contexts.shift(); context_1.subscription.unsubscribe(); context_1.buffer = null; context_1.subscription = null; } this.contexts = null; _super.prototype._error.call(this, err); }; BufferToggleSubscriber.prototype._complete = function () { var contexts = this.contexts; while (contexts.length > 0) { var context_2 = contexts.shift(); this.destination.next(context_2.buffer); context_2.subscription.unsubscribe(); context_2.buffer = null; context_2.subscription = null; } this.contexts = null; _super.prototype._complete.call(this); }; BufferToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) { outerValue ? this.closeBuffer(outerValue) : this.openBuffer(innerValue); }; BufferToggleSubscriber.prototype.notifyComplete = function (innerSub) { this.closeBuffer(innerSub.context); }; BufferToggleSubscriber.prototype.openBuffer = function (value) { try { var closingSelector = this.closingSelector; var closingNotifier = closingSelector.call(this, value); if (closingNotifier) { this.trySubscribe(closingNotifier); } } catch (err) { this._error(err); } }; BufferToggleSubscriber.prototype.closeBuffer = function (context) { var contexts = this.contexts; if (contexts && context) { var buffer = context.buffer, subscription = context.subscription; this.destination.next(buffer); contexts.splice(contexts.indexOf(context), 1); this.remove(subscription); subscription.unsubscribe(); } }; BufferToggleSubscriber.prototype.trySubscribe = function (closingNotifier) { var contexts = this.contexts; var buffer = []; var subscription = new Subscription_1.Subscription(); var context = { buffer: buffer, subscription: subscription }; contexts.push(context); var innerSubscription = subscribeToResult_1.subscribeToResult(this, closingNotifier, context); if (!innerSubscription || innerSubscription.closed) { this.closeBuffer(context); } else { innerSubscription.context = context; this.add(innerSubscription); subscription.add(innerSubscription); } }; return BufferToggleSubscriber; }(OuterSubscriber_1.OuterSubscriber)); //# sourceMappingURL=bufferToggle.js.map
[+]
..
[-] switchMap.d.ts
[edit]
[-] race.d.ts
[edit]
[-] withLatestFrom.js
[edit]
[-] skipLast.js.map
[edit]
[-] buffer.d.ts
[edit]
[-] distinctUntilKeyChanged.d.ts
[edit]
[-] publishReplay.js
[edit]
[-] exhaust.js
[edit]
[-] zip.js.map
[edit]
[-] retry.d.ts
[edit]
[-] mergeAll.js.map
[edit]
[-] last.d.ts
[edit]
[-] single.js
[edit]
[-] mergeMapTo.js.map
[edit]
[-] distinctUntilChanged.js
[edit]
[-] windowToggle.d.ts
[edit]
[-] throttle.js
[edit]
[-] shareReplay.d.ts
[edit]
[-] auditTime.d.ts
[edit]
[-] find.js
[edit]
[-] mapTo.d.ts
[edit]
[-] bufferToggle.js
[edit]
[-] concat.js
[edit]
[-] isEmpty.js.map
[edit]
[-] concatMapTo.d.ts
[edit]
[-] first.d.ts
[edit]
[-] windowTime.js.map
[edit]
[-] windowTime.d.ts
[edit]
[-] sample.d.ts
[edit]
[-] takeWhile.js.map
[edit]
[-] sequenceEqual.d.ts
[edit]
[-] combineLatest.js
[edit]
[-] debounce.js.map
[edit]
[-] auditTime.js
[edit]
[-] multicast.js.map
[edit]
[-] observeOn.d.ts
[edit]
[-] dematerialize.js
[edit]
[-] mapTo.js.map
[edit]
[-] sample.js.map
[edit]
[-] debounceTime.d.ts
[edit]
[-] throwIfEmpty.d.ts
[edit]
[-] merge.d.ts
[edit]
[-] finalize.js
[edit]
[-] windowCount.d.ts
[edit]
[-] takeUntil.js
[edit]
[-] toArray.d.ts
[edit]
[-] concatMap.js
[edit]
[-] shareReplay.js.map
[edit]
[-] zipAll.js
[edit]
[-] windowToggle.js.map
[edit]
[-] debounceTime.js
[edit]
[-] sequenceEqual.js
[edit]
[-] exhaustMap.d.ts
[edit]
[-] toArray.js
[edit]
[-] pairwise.js.map
[edit]
[-] index.js.map
[edit]
[-] withLatestFrom.d.ts
[edit]
[-] skip.d.ts
[edit]
[-] ignoreElements.d.ts
[edit]
[-] distinctUntilChanged.d.ts
[edit]
[-] timestamp.js
[edit]
[-] shareReplay.js
[edit]
[-] mergeMap.js
[edit]
[-] retryWhen.js
[edit]
[-] bufferWhen.js.map
[edit]
[-] reduce.js
[edit]
[-] scan.js
[edit]
[-] publish.d.ts
[edit]
[-] max.js
[edit]
[-] mergeMapTo.js
[edit]
[-] bufferWhen.d.ts
[edit]
[-] throttle.js.map
[edit]
[-] skipWhile.js.map
[edit]
[-] delay.js
[edit]
[-] every.js.map
[edit]
[-] concat.js.map
[edit]
[-] map.d.ts
[edit]
[-] refCount.js
[edit]
[-] materialize.js
[edit]
[-] publishLast.js.map
[edit]
[-] windowCount.js.map
[edit]
[-] sampleTime.d.ts
[edit]
[-] toArray.js.map
[edit]
[-] index.d.ts
[edit]
[-] catchError.js
[edit]
[-] max.d.ts
[edit]
[-] takeWhile.d.ts
[edit]
[-] buffer.js
[edit]
[-] buffer.js.map
[edit]
[-] observeOn.js.map
[edit]
[-] elementAt.d.ts
[edit]
[-] elementAt.js.map
[edit]
[-] partition.d.ts
[edit]
[-] skip.js.map
[edit]
[-] exhaust.js.map
[edit]
[-] concatMap.js.map
[edit]
[-] mapTo.js
[edit]
[-] repeatWhen.js.map
[edit]
[-] pluck.js
[edit]
[-] windowWhen.d.ts
[edit]
[-] skipWhile.d.ts
[edit]
[-] bufferTime.d.ts
[edit]
[-] publish.js.map
[edit]
[-] timeInterval.d.ts
[edit]
[-] takeLast.js
[edit]
[-] distinct.js.map
[edit]
[-] retryWhen.d.ts
[edit]
[-] subscribeOn.js.map
[edit]
[-] every.d.ts
[edit]
[-] groupBy.js.map
[edit]
[-] single.d.ts
[edit]
[-] merge.js.map
[edit]
[-] distinct.d.ts
[edit]
[-] first.js.map
[edit]
[-] publishBehavior.js
[edit]
[-] zipAll.d.ts
[edit]
[-] mergeAll.d.ts
[edit]
[-] throttleTime.js
[edit]
[-] skip.js
[edit]
[-] debounce.js
[edit]
[-] count.js.map
[edit]
[-] retry.js
[edit]
[-] timeout.js
[edit]
[-] throwIfEmpty.js.map
[edit]
[-] bufferTime.js.map
[edit]
[-] concatAll.js.map
[edit]
[-] refCount.d.ts
[edit]
[-] takeUntil.js.map
[edit]
[-] take.js
[edit]
[-] pairwise.js
[edit]
[-] skipUntil.js.map
[edit]
[-] repeat.d.ts
[edit]
[-] publishLast.d.ts
[edit]
[-] max.js.map
[edit]
[-] subscribeOn.d.ts
[edit]
[-] take.js.map
[edit]
[-] audit.js
[edit]
[-] bufferWhen.js
[edit]
[-] bufferCount.js.map
[edit]
[-] reduce.js.map
[edit]
[-] concatAll.js
[edit]
[-] skipLast.js
[edit]
[-] share.d.ts
[edit]
[-] merge.js
[edit]
[-] concatMapTo.js
[edit]
[-] timeout.js.map
[edit]
[-] defaultIfEmpty.js
[edit]
[-] switchAll.d.ts
[edit]
[-] skipUntil.js
[edit]
[-] mergeAll.js
[edit]
[-] takeLast.js.map
[edit]
[-] exhaustMap.js
[edit]
[-] publishReplay.d.ts
[edit]
[-] mergeMap.d.ts
[edit]
[-] publishLast.js
[edit]
[-] ignoreElements.js
[edit]
[-] timeoutWith.d.ts
[edit]
[-] scan.d.ts
[edit]
[-] share.js.map
[edit]
[-] timeInterval.js.map
[edit]
[-] onErrorResumeNext.js
[edit]
[-] repeatWhen.d.ts
[edit]
[-] catchError.d.ts
[edit]
[-] single.js.map
[edit]
[-] delayWhen.js
[edit]
[-] switchAll.js.map
[edit]
[-] min.js
[edit]
[-] last.js.map
[edit]
[-] delay.d.ts
[edit]
[-] publishBehavior.d.ts
[edit]
[-] pairwise.d.ts
[edit]
[-] distinctUntilChanged.js.map
[edit]
[-] windowCount.js
[edit]
[-] switchMapTo.js
[edit]
[-] zip.d.ts
[edit]
[-] throwIfEmpty.js
[edit]
[-] tap.js.map
[edit]
[-] onErrorResumeNext.js.map
[edit]
[-] partition.js
[edit]
[-] subscribeOn.js
[edit]
[-] mergeMap.js.map
[edit]
[-] groupBy.js
[edit]
[-] first.js
[edit]
[-] windowWhen.js
[edit]
[-] scan.js.map
[edit]
[-] map.js.map
[edit]
[-] groupBy.d.ts
[edit]
[-] expand.d.ts
[edit]
[-] min.js.map
[edit]
[-] mergeScan.d.ts
[edit]
[-] debounceTime.js.map
[edit]
[-] tap.d.ts
[edit]
[-] defaultIfEmpty.d.ts
[edit]
[-] materialize.d.ts
[edit]
[-] retryWhen.js.map
[edit]
[-] concatAll.d.ts
[edit]
[-] windowToggle.js
[edit]
[-] windowWhen.js.map
[edit]
[-] share.js
[edit]
[-] catchError.js.map
[edit]
[-] zipAll.js.map
[edit]
[-] count.d.ts
[edit]
[-] filter.d.ts
[edit]
[-] pluck.js.map
[edit]
[-] repeatWhen.js
[edit]
[-] filter.js.map
[edit]
[-] count.js
[edit]
[-] index.js
[edit]
[-] concatMap.d.ts
[edit]
[-] switchMapTo.d.ts
[edit]
[-] find.d.ts
[edit]
[-] materialize.js.map
[edit]
[-] timeoutWith.js
[edit]
[-] zip.js
[edit]
[-] bufferCount.js
[edit]
[-] debounce.d.ts
[edit]
[-] audit.d.ts
[edit]
[-] expand.js.map
[edit]
[-] startWith.js
[edit]
[-] endWith.js.map
[edit]
[-] endWith.d.ts
[edit]
[-] endWith.js
[edit]
[-] windowTime.js
[edit]
[-] race.js
[edit]
[-] window.js.map
[edit]
[-] delayWhen.js.map
[edit]
[-] delay.js.map
[edit]
[-] switchMap.js.map
[edit]
[-] combineAll.js.map
[edit]
[-] sampleTime.js
[edit]
[-] switchMap.js
[edit]
[-] race.js.map
[edit]
[-] tap.js
[edit]
[-] switchAll.js
[edit]
[-] ignoreElements.js.map
[edit]
[-] audit.js.map
[edit]
[-] dematerialize.js.map
[edit]
[-] timestamp.js.map
[edit]
[-] exhaust.d.ts
[edit]
[-] multicast.d.ts
[edit]
[-] finalize.js.map
[edit]
[-] concat.d.ts
[edit]
[-] last.js
[edit]
[-] publishReplay.js.map
[edit]
[-] find.js.map
[edit]
[-] timeInterval.js
[edit]
[-] refCount.js.map
[edit]
[-] combineLatest.d.ts
[edit]
[-] auditTime.js.map
[edit]
[-] combineAll.js
[edit]
[-] publishBehavior.js.map
[edit]
[-] takeUntil.d.ts
[edit]
[-] delayWhen.d.ts
[edit]
[-] defaultIfEmpty.js.map
[edit]
[-] observeOn.js
[edit]
[-] skipLast.d.ts
[edit]
[-] publish.js
[edit]
[-] finalize.d.ts
[edit]
[-] mergeScan.js.map
[edit]
[-] concatMapTo.js.map
[edit]
[-] map.js
[edit]
[-] distinctUntilKeyChanged.js
[edit]
[-] throttle.d.ts
[edit]
[-] findIndex.js
[edit]
[-] filter.js
[edit]
[-] every.js
[edit]
[-] sampleTime.js.map
[edit]
[-] throttleTime.d.ts
[edit]
[-] skipUntil.d.ts
[edit]
[-] onErrorResumeNext.d.ts
[edit]
[-] sequenceEqual.js.map
[edit]
[-] takeWhile.js
[edit]
[-] mergeScan.js
[edit]
[-] bufferToggle.js.map
[edit]
[-] startWith.d.ts
[edit]
[-] exhaustMap.js.map
[edit]
[-] multicast.js
[edit]
[-] timestamp.d.ts
[edit]
[-] combineAll.d.ts
[edit]
[-] bufferToggle.d.ts
[edit]
[-] findIndex.js.map
[edit]
[-] isEmpty.js
[edit]
[-] retry.js.map
[edit]
[-] findIndex.d.ts
[edit]
[-] startWith.js.map
[edit]
[-] distinctUntilKeyChanged.js.map
[edit]
[-] isEmpty.d.ts
[edit]
[-] min.d.ts
[edit]
[-] distinct.js
[edit]
[-] bufferTime.js
[edit]
[-] mergeMapTo.d.ts
[edit]
[-] withLatestFrom.js.map
[edit]
[-] reduce.d.ts
[edit]
[-] pluck.d.ts
[edit]
[-] repeat.js
[edit]
[-] take.d.ts
[edit]
[-] combineLatest.js.map
[edit]
[-] partition.js.map
[edit]
[-] elementAt.js
[edit]
[-] skipWhile.js
[edit]
[-] timeout.d.ts
[edit]
[-] takeLast.d.ts
[edit]
[-] repeat.js.map
[edit]
[-] timeoutWith.js.map
[edit]
[-] sample.js
[edit]
[-] bufferCount.d.ts
[edit]
[-] window.js
[edit]
[-] expand.js
[edit]
[-] switchMapTo.js.map
[edit]
[-] dematerialize.d.ts
[edit]
[-] throttleTime.js.map
[edit]
[-] window.d.ts
[edit]