new license file version [CI SKIP]

This commit is contained in:
2023-03-15 13:43:57 +00:00
parent d8a3063735
commit 00359d25c1
5600 changed files with 523898 additions and 2 deletions

View File

@@ -0,0 +1 @@
{"version":3,"file":"async.js","sources":["../../../src/internal/scheduler/async.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgDlD,MAAM,CAAC,IAAM,cAAc,GAAG,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;AAK9D,MAAM,CAAC,IAAM,KAAK,GAAG,cAAc,CAAC"}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"Y Z a b c d f g h i j k l m n o p q r s D t","2":"C K L H M N O","194":"P Q R S T U V W X"},C:{"1":"s D t xB yB","2":"0 1 2 3 4 5 6 7 8 9 CC tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l DC EC","322":"m n o p q r"},D:{"1":"Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e","194":"lB mB nB oB pB P Q R S T U V W X"},E:{"1":"NC","2":"I u J E F G A B C K L H GC zB HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B"},F:{"1":"nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB OC PC QC RC qB 9B SC rB","194":"aB bB cB dB eB fB gB hB iB jB kB e lB mB"},G:{"2":"F zB TC AC UC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"2":"E A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"uC"},P:{"1":"4C sB 5C 6C 7C","2":"I vC wC xC yC zC 0B 0C 1C 2C 3C"},Q:{"2":"1B"},R:{"1":"8C"},S:{"2":"9C"}},B:7,C:"Import maps"};

View File

@@ -0,0 +1,38 @@
import assertString from './util/assertString';
var isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;
export default function isISIN(str) {
assertString(str);
if (!isin.test(str)) {
return false;
}
var checksumStr = str.replace(/[A-Z]/g, function (character) {
return parseInt(character, 36);
});
var sum = 0;
var digit;
var tmpNum;
var shouldDouble = true;
for (var i = checksumStr.length - 2; i >= 0; i--) {
digit = checksumStr.substring(i, i + 1);
tmpNum = parseInt(digit, 10);
if (shouldDouble) {
tmpNum *= 2;
if (tmpNum >= 10) {
sum += tmpNum + 1;
} else {
sum += tmpNum;
}
} else {
sum += tmpNum;
}
shouldDouble = !shouldDouble;
}
return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"dematerialize.js","sources":["../../../src/internal/operators/dematerialize.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAkD3C,MAAM,UAAU,aAAa;IAC3B,OAAO,SAAS,6BAA6B,CAAC,MAAmC;QAC/E,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,qBAAqB,EAAE,CAAC,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC;AAED;IAAA;IAIA,CAAC;IAHC,oCAAI,GAAJ,UAAK,UAA2B,EAAE,MAAW;QAC3C,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAC;IACnE,CAAC;IACH,4BAAC;AAAD,CAAC,AAJD,IAIC;AAOD;IAAmE,mDAAa;IAC9E,iCAAY,WAA4B;eACtC,kBAAM,WAAW,CAAC;IACpB,CAAC;IAES,uCAAK,GAAf,UAAgB,KAAQ;QACtB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACH,8BAAC;AAAD,CAAC,AARD,CAAmE,UAAU,GAQ5E"}

View File

@@ -0,0 +1,13 @@
/**
* Helper functions to schedule and unschedule microtasks.
*/
export declare const Immediate: {
setImmediate(cb: () => void): number;
clearImmediate(handle: number): void;
};
/**
* Used for internal testing purposes only. Do not export from library.
*/
export declare const TestTools: {
pending(): number;
};

View File

@@ -0,0 +1,41 @@
declare const importFrom: {
/**
Import a module like with [`require()`](https://nodejs.org/api/modules.html#modules_require_id) but from a given path.
@param fromDirectory - Directory to import from.
@param moduleId - What you would use in `require()`.
@throws Like `require()`, throws when the module can't be found.
@example
```
import importFrom = require('import-from');
try {
const bar = importFrom('foo', './bar');
// Do something with `bar`
} catch (error) {
// `error` is thrown when `./bar` can't be found
}
```
*/
(fromDirectory: string, moduleId: string): unknown;
/**
Import a module like with [`require()`](https://nodejs.org/api/modules.html#modules_require_id) but from a given path.
@param fromDirectory - Directory to import from.
@param moduleId - What you would use in `require()`.
@returns `undefined` instead of throwing when the module can't be found.
@example
```
import importFrom = require('import-from');
const bar = importFrom.silent('foo', './bar');
// Do something with `bar`, may be `undefined` when `./bar` can't be found
```
*/
silent(fromDirectory: string, moduleId: string): unknown;
};
export = importFrom;

View File

@@ -0,0 +1,29 @@
import { Subscriber } from './Subscriber';
import { OuterSubscriber } from './OuterSubscriber';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export class InnerSubscriber<T, R> extends Subscriber<R> {
private index = 0;
constructor(private parent: OuterSubscriber<T, R>, public outerValue: T, public outerIndex: number) {
super();
}
protected _next(value: R): void {
this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
}
protected _error(error: any): void {
this.parent.notifyError(error, this);
this.unsubscribe();
}
protected _complete(): void {
this.parent.notifyComplete(this);
this.unsubscribe();
}
}

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0.00188,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0.00188,"49":0,"50":0,"51":0,"52":0.01126,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00563,"69":0,"70":0,"71":0,"72":0.00188,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00188,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0.00563,"85":0,"86":0,"87":0,"88":0.00188,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0.00188,"97":0,"98":0,"99":0.00188,"100":0.00188,"101":0.00188,"102":0.00563,"103":0.00188,"104":0.00563,"105":0.00563,"106":0.00375,"107":0.00751,"108":0.15204,"109":0.0732,"110":0,"111":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0.00188,"36":0,"37":0,"38":0.00188,"39":0,"40":0.00375,"41":0,"42":0,"43":0.00188,"44":0,"45":0,"46":0.00188,"47":0.00939,"48":0,"49":0.00188,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0.00188,"56":0,"57":0.00188,"58":0.00563,"59":0,"60":0,"61":0,"62":0,"63":0.00375,"64":0.00375,"65":0.00375,"66":0,"67":0,"68":0.00375,"69":0.00188,"70":0.04693,"71":0.00188,"72":0.00375,"73":0,"74":0.00188,"75":0.00188,"76":0,"77":0,"78":0.00188,"79":0.00751,"80":0.00563,"81":0.01126,"83":0.00375,"84":0.00375,"85":0.00188,"86":0.00563,"87":0.00563,"88":0.00375,"89":0.00751,"90":0.00375,"91":0.00375,"92":0.00751,"93":0.00188,"94":0.00375,"95":0.01314,"96":0.00375,"97":0.00188,"98":0.00375,"99":0.00375,"100":0.00751,"101":0.00563,"102":0.00751,"103":0.01689,"104":0.01126,"105":0.01126,"106":0.01877,"107":0.03942,"108":1.09054,"109":0.75268,"110":0,"111":0,"112":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00188,"29":0,"30":0,"31":0,"32":0,"33":0.00188,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0.00188,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0.00188,"58":0.00188,"60":0.00188,"62":0,"63":0.00563,"64":0.00188,"65":0.00188,"66":0.00563,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.00188,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00563,"80":0,"81":0,"82":0,"83":0.00188,"84":0,"85":0.00188,"86":0.00188,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00188,"93":0.01126,"94":0.06194,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0.00188,"15":0,"16":0,"17":0.00188,"18":0.01502,"79":0,"80":0,"81":0,"83":0,"84":0.00188,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00375,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0.00188,"106":0.00188,"107":0.00563,"108":0.10324,"109":0.08259},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00188,"15":0.00375,_:"0","3.1":0,"3.2":0,"5.1":0.38666,"6.1":0,"7.1":0,"9.1":0,"10.1":0.00188,"11.1":0,"12.1":0,"13.1":0.00188,"14.1":0.00563,"15.1":0.00375,"15.2-15.3":0,"15.4":0,"15.5":0.00188,"15.6":0.00751,"16.0":0,"16.1":0.00188,"16.2":0.00375,"16.3":0},G:{"8":0,"3.2":0.0007,"4.0-4.1":0,"4.2-4.3":0.0007,"5.0-5.1":0.00419,"6.0-6.1":0.0014,"7.0-7.1":0.03248,"8.1-8.4":0.0007,"9.0-9.2":0.00314,"9.3":0.06112,"10.0-10.2":0.00105,"10.3":0.05134,"11.0-11.2":0.00244,"11.3-11.4":0.01257,"12.0-12.1":0.022,"12.2-12.5":0.34996,"13.0-13.1":0.00978,"13.2":0.00279,"13.3":0.0255,"13.4-13.7":0.05972,"14.0-14.4":0.2574,"14.5-14.8":0.25147,"15.0-15.1":0.12294,"15.2-15.3":0.1198,"15.4":0.09046,"15.5":0.27033,"15.6":0.23505,"16.0":0.38838,"16.1":0.36532,"16.2":0.37825,"16.3":0.04401},P:{"4":1.50755,"5.0-5.4":0.06238,"6.2-6.4":0.24953,"7.2-7.4":0.31191,"8.2":0.04159,"9.2":0.16635,"10.1":0.15595,"11.1-11.2":0.19754,"12.0":0.07278,"13.0":0.25992,"14.0":0.37429,"15.0":0.13516,"16.0":0.44707,"17.0":0.62381,"18.0":0.59262,"19.0":1.22684},I:{"0":0,"3":0,"4":0.0062,"2.1":0,"2.2":0,"2.3":0,"4.1":0.02273,"4.2-4.3":0.08265,"4.4":0,"4.4.3-4.4.4":0.71081},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.01689,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},S:{"2.5":0},R:{_:"0"},M:{"0":0.14621},Q:{"13.1":0},O:{"0":1.29968},H:{"0":1.42271},L:{"0":81.26658}};

View File

@@ -0,0 +1 @@
module.exports={A:{D:{"2":"I u J E F G A B C K L H M N O v w x","33":"0 1 2 3 4 5 6 7 8 9 y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC"},L:{"33":"D"},B:{"2":"C K L H M N O","33":"P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t"},C:{"2":"CC","33":"0 1 2 3 4 5 6 7 8 9 tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB DC EC"},M:{"33":"D"},A:{"2":"J E F G A B BC"},F:{"2":"G B C OC PC QC RC qB 9B SC rB","33":"0 1 2 3 4 5 6 7 8 9 H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d"},K:{"2":"A B C qB 9B rB","33":"e"},E:{"2":"I u J GC zB HC IC NC","33":"E F G A B C K L H JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B"},G:{"2":"zB TC AC UC VC","33":"F WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B"},P:{"2":"I","33":"vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},I:{"2":"tB I oC pC qC rC AC","33":"D sC tC"}},B:6,C:"width: stretch property"};

View File

@@ -0,0 +1 @@
{"version":3,"file":"isScheduler.js","sources":["../../src/internal/util/isScheduler.ts"],"names":[],"mappings":";;AAEA,SAAgB,WAAW,CAAC,KAAU;IACpC,OAAO,KAAK,IAAI,OAAa,KAAM,CAAC,QAAQ,KAAK,UAAU,CAAC;AAC9D,CAAC;AAFD,kCAEC"}

View File

@@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("rxjs-compat/add/operator/throttleTime");
//# sourceMappingURL=throttleTime.js.map

View File

@@ -0,0 +1,3 @@
import { Observable } from '../Observable';
import { SchedulerLike } from '../types';
export declare function scheduleIterable<T>(input: Iterable<T>, scheduler: SchedulerLike): Observable<T>;

View File

@@ -0,0 +1 @@
{"name":"lowercase-keys","version":"2.0.0","files":{"license":{"checkedAt":1678887829653,"integrity":"sha512-nIst73auX/5NY2Fmv5Y116vWnNrEv4GaIUX3lpZG05rpXJY2S8EX+fpUS5hRjClCM0VdT2Za9DDHXXB5jdSrEw==","mode":420,"size":1109},"package.json":{"checkedAt":1678887829990,"integrity":"sha512-++aUt3w7K/VM7Y6M0I3aRMyouJ9lD/e0byKGegKNNACgAwdrfTi1NXKu24gSnZmFMkUKkijgCTF1kPndLcRvpA==","mode":420,"size":614},"index.d.ts":{"checkedAt":1678887829990,"integrity":"sha512-Fskx7fTB5kBegDy48kz28KNeffFJci+kWoqeXRjvBj+EEyiXpQsL6P5aCGJqG/hWrQL0Bh+1+vUnQ/B/5JEGgg==","mode":420,"size":351},"readme.md":{"checkedAt":1678887829990,"integrity":"sha512-vW2VLTDJzzzGHSU6SdJiTyyu43P1YBNQEGuSEd57gl/GHRFGqAoeNJ1edlotBq6L66MhRWkoQ8nKHRNpQc069g==","mode":420,"size":529},"index.js":{"checkedAt":1678887829990,"integrity":"sha512-vUAD9mR0L2JlLFvxMUI5DUwBpzte55dtMfv+mCgocMKYsy6TMKu9zPu2hMiUgt1Wkd5csu+2m5UAeWpYF7e8vw==","mode":420,"size":178}}}

View File

@@ -0,0 +1,157 @@
import { Operator } from '../Operator';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
import { map } from './map';
import { from } from '../observable/from';
import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';
/* tslint:disable:max-line-length */
export function exhaustMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated resultSelector is no longer supported. Use inner map instead. */
export function exhaustMap<T, O extends ObservableInput<any>>(project: (value: T, index: number) => O, resultSelector: undefined): OperatorFunction<T, ObservedValueOf<O>>;
/** @deprecated resultSelector is no longer supported. Use inner map instead. */
export function exhaustMap<T, I, R>(project: (value: T, index: number) => ObservableInput<I>, resultSelector: (outerValue: T, innerValue: I, outerIndex: number, innerIndex: number) => R): OperatorFunction<T, R>;
/* tslint:enable:max-line-length */
/**
* Projects each source value to an Observable which is merged in the output
* Observable only if the previous projected Observable has completed.
*
* <span class="informal">Maps each value to an Observable, then flattens all of
* these inner Observables using {@link exhaust}.</span>
*
* ![](exhaustMap.png)
*
* Returns an Observable that emits items based on applying a function that you
* supply to each item emitted by the source Observable, where that function
* returns an (so-called "inner") Observable. When it projects a source value to
* an Observable, the output Observable begins emitting the items emitted by
* that projected Observable. However, `exhaustMap` ignores every new projected
* Observable if the previous projected Observable has not yet completed. Once
* that one completes, it will accept and flatten the next projected Observable
* and repeat this process.
*
* ## Example
* Run a finite timer for each click, only if there is no currently active timer
* ```ts
* import { fromEvent, interval } from 'rxjs';
* import { exhaustMap, take } from 'rxjs/operators';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* exhaustMap(ev => interval(1000).pipe(take(5)))
* );
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link concatMap}
* @see {@link exhaust}
* @see {@link mergeMap}
* @see {@link switchMap}
*
* @param {function(value: T, ?index: number): ObservableInput} project A function
* that, when applied to an item emitted by the source Observable, returns an
* Observable.
* @return {Observable} An Observable containing projected Observables
* of each item of the source, ignoring projected Observables that start before
* their preceding Observable has completed.
* @method exhaustMap
* @owner Observable
*/
export function exhaustMap<T, R, O extends ObservableInput<any>>(
project: (value: T, index: number) => O,
resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R,
): OperatorFunction<T, ObservedValueOf<O>|R> {
if (resultSelector) {
// DEPRECATED PATH
return (source: Observable<T>) => source.pipe(
exhaustMap((a, i) => from(project(a, i)).pipe(
map((b: any, ii: any) => resultSelector(a, b, i, ii)),
)),
);
}
return (source: Observable<T>) =>
source.lift(new ExhaustMapOperator(project));
}
class ExhaustMapOperator<T, R> implements Operator<T, R> {
constructor(private project: (value: T, index: number) => ObservableInput<R>) {
}
call(subscriber: Subscriber<R>, source: any): any {
return source.subscribe(new ExhaustMapSubscriber(subscriber, this.project));
}
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
class ExhaustMapSubscriber<T, R> extends SimpleOuterSubscriber<T, R> {
private hasSubscription = false;
private hasCompleted = false;
private index = 0;
constructor(destination: Subscriber<R>,
private project: (value: T, index: number) => ObservableInput<R>) {
super(destination);
}
protected _next(value: T): void {
if (!this.hasSubscription) {
this.tryNext(value);
}
}
private tryNext(value: T): void {
let result: ObservableInput<R>;
const index = this.index++;
try {
result = this.project(value, index);
} catch (err) {
this.destination.error!(err);
return;
}
this.hasSubscription = true;
this._innerSub(result);
}
private _innerSub(result: ObservableInput<R>): void {
const innerSubscriber = new SimpleInnerSubscriber(this);
const destination = this.destination as Subscription;
destination.add(innerSubscriber);
const innerSubscription = innerSubscribe(result, innerSubscriber);
// The returned subscription will usually be the subscriber that was
// passed. However, interop subscribers will be wrapped and for
// unsubscriptions to chain correctly, the wrapper needs to be added, too.
if (innerSubscription !== innerSubscriber) {
destination.add(innerSubscription);
}
}
protected _complete(): void {
this.hasCompleted = true;
if (!this.hasSubscription) {
this.destination.complete!();
}
this.unsubscribe();
}
notifyNext(innerValue: R): void {
this.destination.next!(innerValue);
}
notifyError(err: any): void {
this.destination.error!(err);
}
notifyComplete(): void {
this.hasSubscription = false;
if (this.hasCompleted) {
this.destination.complete!();
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"buffer.js","sources":["../../../src/internal/operators/buffer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AA0CjG,MAAM,UAAU,MAAM,CAAI,eAAgC;IACxD,OAAO,SAAS,sBAAsB,CAAC,MAAqB;QAC1D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,CAAI,eAAe,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,cAAc;IAElB,YAAoB,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IACpD,CAAC;IAED,IAAI,CAAC,UAA2B,EAAE,MAAW;QAC3C,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAClF,CAAC;CACF;AAOD,MAAM,gBAAoB,SAAQ,qBAA6B;IAG7D,YAAY,WAA4B,EAAE,eAAgC;QACxE,KAAK,CAAC,WAAW,CAAC,CAAC;QAHb,WAAM,GAAQ,EAAE,CAAC;QAIvB,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,eAAe,EAAE,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC;IAES,KAAK,CAAC,KAAQ;QACtB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,IAAI,CAAC,WAAW,CAAC,IAAK,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;CACF"}

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// TODO: Update https://github.com/sindresorhus/get-stream
const getBuffer = async (stream) => {
const chunks = [];
let length = 0;
for await (const chunk of stream) {
chunks.push(chunk);
length += Buffer.byteLength(chunk);
}
if (Buffer.isBuffer(chunks[0])) {
return Buffer.concat(chunks, length);
}
return Buffer.from(chunks.join(''));
};
exports.default = getBuffer;

View File

@@ -0,0 +1,101 @@
var common = require('../common');
var assert = common.assert;
var fake = common.fake.create();
var retry = require(common.dir.lib + '/retry');
function getLib() {
return {
fn1: function() {},
fn2: function() {},
fn3: function() {}
};
}
(function wrapAll() {
var lib = getLib();
retry.wrap(lib);
assert.equal(lib.fn1.name, 'bound retryWrapper');
assert.equal(lib.fn2.name, 'bound retryWrapper');
assert.equal(lib.fn3.name, 'bound retryWrapper');
}());
(function wrapAllPassOptions() {
var lib = getLib();
retry.wrap(lib, {retries: 2});
assert.equal(lib.fn1.name, 'bound retryWrapper');
assert.equal(lib.fn2.name, 'bound retryWrapper');
assert.equal(lib.fn3.name, 'bound retryWrapper');
assert.equal(lib.fn1.options.retries, 2);
assert.equal(lib.fn2.options.retries, 2);
assert.equal(lib.fn3.options.retries, 2);
}());
(function wrapDefined() {
var lib = getLib();
retry.wrap(lib, ['fn2', 'fn3']);
assert.notEqual(lib.fn1.name, 'bound retryWrapper');
assert.equal(lib.fn2.name, 'bound retryWrapper');
assert.equal(lib.fn3.name, 'bound retryWrapper');
}());
(function wrapDefinedAndPassOptions() {
var lib = getLib();
retry.wrap(lib, {retries: 2}, ['fn2', 'fn3']);
assert.notEqual(lib.fn1.name, 'bound retryWrapper');
assert.equal(lib.fn2.name, 'bound retryWrapper');
assert.equal(lib.fn3.name, 'bound retryWrapper');
assert.equal(lib.fn2.options.retries, 2);
assert.equal(lib.fn3.options.retries, 2);
}());
(function runWrappedWithoutError() {
var callbackCalled;
var lib = {method: function(a, b, callback) {
assert.equal(a, 1);
assert.equal(b, 2);
assert.equal(typeof callback, 'function');
callback();
}};
retry.wrap(lib);
lib.method(1, 2, function() {
callbackCalled = true;
});
assert.ok(callbackCalled);
}());
(function runWrappedSeveralWithoutError() {
var callbacksCalled = 0;
var lib = {
fn1: function (a, callback) {
assert.equal(a, 1);
assert.equal(typeof callback, 'function');
callback();
},
fn2: function (a, callback) {
assert.equal(a, 2);
assert.equal(typeof callback, 'function');
callback();
}
};
retry.wrap(lib, {}, ['fn1', 'fn2']);
lib.fn1(1, function() {
callbacksCalled++;
});
lib.fn2(2, function() {
callbacksCalled++;
});
assert.equal(callbacksCalled, 2);
}());
(function runWrappedWithError() {
var callbackCalled;
var lib = {method: function(callback) {
callback(new Error('Some error'));
}};
retry.wrap(lib, {retries: 1});
lib.method(function(err) {
callbackCalled = true;
assert.ok(err instanceof Error);
});
assert.ok(!callbackCalled);
}());

View File

@@ -0,0 +1 @@
{"version":3,"file":"isPromise.js","sources":["../../src/internal/util/isPromise.ts"],"names":[],"mappings":";;AAKA,SAAgB,SAAS,CAAC,KAAU;IAClC,OAAO,CAAC,CAAC,KAAK,IAAI,OAAa,KAAM,CAAC,SAAS,KAAK,UAAU,IAAI,OAAQ,KAAa,CAAC,IAAI,KAAK,UAAU,CAAC;AAC9G,CAAC;AAFD,8BAEC"}

View File

@@ -0,0 +1,11 @@
import { not } from '../util/not';
import { subscribeTo } from '../util/subscribeTo';
import { filter } from '../operators/filter';
import { Observable } from '../Observable';
export function partition(source, predicate, thisArg) {
return [
filter(predicate, thisArg)(new Observable(subscribeTo(source))),
filter(not(predicate, thisArg))(new Observable(subscribeTo(source)))
];
}
//# sourceMappingURL=partition.js.map