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,90 @@
/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { Subscriber } from '../Subscriber';
export function bufferCount(bufferSize, startBufferEvery) {
if (startBufferEvery === void 0) {
startBufferEvery = null;
}
return function bufferCountOperatorFunction(source) {
return source.lift(new BufferCountOperator(bufferSize, startBufferEvery));
};
}
var BufferCountOperator = /*@__PURE__*/ (function () {
function BufferCountOperator(bufferSize, startBufferEvery) {
this.bufferSize = bufferSize;
this.startBufferEvery = startBufferEvery;
if (!startBufferEvery || bufferSize === startBufferEvery) {
this.subscriberClass = BufferCountSubscriber;
}
else {
this.subscriberClass = BufferSkipCountSubscriber;
}
}
BufferCountOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new this.subscriberClass(subscriber, this.bufferSize, this.startBufferEvery));
};
return BufferCountOperator;
}());
var BufferCountSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(BufferCountSubscriber, _super);
function BufferCountSubscriber(destination, bufferSize) {
var _this = _super.call(this, destination) || this;
_this.bufferSize = bufferSize;
_this.buffer = [];
return _this;
}
BufferCountSubscriber.prototype._next = function (value) {
var buffer = this.buffer;
buffer.push(value);
if (buffer.length == this.bufferSize) {
this.destination.next(buffer);
this.buffer = [];
}
};
BufferCountSubscriber.prototype._complete = function () {
var buffer = this.buffer;
if (buffer.length > 0) {
this.destination.next(buffer);
}
_super.prototype._complete.call(this);
};
return BufferCountSubscriber;
}(Subscriber));
var BufferSkipCountSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(BufferSkipCountSubscriber, _super);
function BufferSkipCountSubscriber(destination, bufferSize, startBufferEvery) {
var _this = _super.call(this, destination) || this;
_this.bufferSize = bufferSize;
_this.startBufferEvery = startBufferEvery;
_this.buffers = [];
_this.count = 0;
return _this;
}
BufferSkipCountSubscriber.prototype._next = function (value) {
var _a = this, bufferSize = _a.bufferSize, startBufferEvery = _a.startBufferEvery, buffers = _a.buffers, count = _a.count;
this.count++;
if (count % startBufferEvery === 0) {
buffers.push([]);
}
for (var i = buffers.length; i--;) {
var buffer = buffers[i];
buffer.push(value);
if (buffer.length === bufferSize) {
buffers.splice(i, 1);
this.destination.next(buffer);
}
}
};
BufferSkipCountSubscriber.prototype._complete = function () {
var _a = this, buffers = _a.buffers, destination = _a.destination;
while (buffers.length > 0) {
var buffer = buffers.shift();
if (buffer.length > 0) {
destination.next(buffer);
}
}
_super.prototype._complete.call(this);
};
return BufferSkipCountSubscriber;
}(Subscriber));
//# sourceMappingURL=bufferCount.js.map

View File

@@ -0,0 +1,7 @@
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("rxjs-compat/observable/fromArray"));
//# sourceMappingURL=fromArray.js.map

View File

@@ -0,0 +1,42 @@
{
"name": "latest-version",
"version": "5.1.0",
"description": "Get the latest version of an npm package",
"license": "MIT",
"repository": "sindresorhus/latest-version",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"latest",
"version",
"npm",
"pkg",
"package",
"package.json",
"current",
"module"
],
"dependencies": {
"package-json": "^6.3.0"
},
"devDependencies": {
"ava": "^1.4.1",
"semver": "^6.0.0",
"semver-regex": "^2.0.0",
"tsd": "^0.7.2",
"xo": "^0.24.0"
}
}

View File

@@ -0,0 +1,34 @@
let Declaration = require('../declaration')
class InlineLogical extends Declaration {
/**
* Use old syntax for -moz- and -webkit-
*/
prefixed (prop, prefix) {
return prefix + prop.replace('-inline', '')
}
/**
* Return property name by spec
*/
normalize (prop) {
return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2')
}
}
InlineLogical.names = [
'border-inline-start',
'border-inline-end',
'margin-inline-start',
'margin-inline-end',
'padding-inline-start',
'padding-inline-end',
'border-start',
'border-end',
'margin-start',
'margin-end',
'padding-start',
'padding-end'
]
module.exports = InlineLogical

View File

@@ -0,0 +1,121 @@
import { Observable } from '../Observable';
import { Operator } from '../Operator';
import { Observer, OperatorFunction } from '../types';
import { Subscriber } from '../Subscriber';
/**
* Counts the number of emissions on the source and emits that number when the
* source completes.
*
* <span class="informal">Tells how many values were emitted, when the source
* completes.</span>
*
* ![](count.png)
*
* `count` transforms an Observable that emits values into an Observable that
* emits a single value that represents the number of values emitted by the
* source Observable. If the source Observable terminates with an error, `count`
* will pass this error notification along without emitting a value first. If
* the source Observable does not terminate at all, `count` will neither emit
* a value nor terminate. This operator takes an optional `predicate` function
* as argument, in which case the output emission will represent the number of
* source values that matched `true` with the `predicate`.
*
* ## Examples
*
* Counts how many seconds have passed before the first click happened
* ```ts
* import { fromEvent, interval } from 'rxjs';
* import { count, takeUntil } from 'rxjs/operators';
*
* const seconds = interval(1000);
* const clicks = fromEvent(document, 'click');
* const secondsBeforeClick = seconds.pipe(takeUntil(clicks));
* const result = secondsBeforeClick.pipe(count());
* result.subscribe(x => console.log(x));
* ```
*
* Counts how many odd numbers are there between 1 and 7
* ```ts
* import { range } from 'rxjs';
* import { count } from 'rxjs/operators';
*
* const numbers = range(1, 7);
* const result = numbers.pipe(count(i => i % 2 === 1));
* result.subscribe(x => console.log(x));
* // Results in:
* // 4
* ```
*
* @see {@link max}
* @see {@link min}
* @see {@link reduce}
*
* @param {function(value: T, i: number, source: Observable<T>): boolean} [predicate] A
* boolean function to select what values are to be counted. It is provided with
* arguments of:
* - `value`: the value from the source Observable.
* - `index`: the (zero-based) "index" of the value from the source Observable.
* - `source`: the source Observable instance itself.
* @return {Observable} An Observable of one number that represents the count as
* described above.
* @method count
* @owner Observable
*/
export function count<T>(predicate?: (value: T, index: number, source: Observable<T>) => boolean): OperatorFunction<T, number> {
return (source: Observable<T>) => source.lift(new CountOperator(predicate, source));
}
class CountOperator<T> implements Operator<T, number> {
constructor(private predicate?: (value: T, index: number, source: Observable<T>) => boolean,
private source?: Observable<T>) {
}
call(subscriber: Subscriber<number>, source: any): any {
return source.subscribe(new CountSubscriber(subscriber, this.predicate, this.source));
}
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
class CountSubscriber<T> extends Subscriber<T> {
private count: number = 0;
private index: number = 0;
constructor(destination: Observer<number>,
private predicate?: (value: T, index: number, source: Observable<T>) => boolean,
private source?: Observable<T>) {
super(destination);
}
protected _next(value: T): void {
if (this.predicate) {
this._tryPredicate(value);
} else {
this.count++;
}
}
private _tryPredicate(value: T) {
let result: any;
try {
result = this.predicate(value, this.index++, this.source);
} catch (err) {
this.destination.error(err);
return;
}
if (result) {
this.count++;
}
}
protected _complete(): void {
this.destination.next(this.count);
this.destination.complete();
}
}

View File

@@ -0,0 +1,29 @@
import { ObservableInput, OperatorFunction } from '../types';
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, R>(project: (v1: T) => R): OperatorFunction<T, R>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, R>(v2: ObservableInput<T2>, project: (v1: T, v2: T2) => R): OperatorFunction<T, R>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, project: (v1: T, v2: T2, v3: T3) => R): OperatorFunction<T, R>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3, T4, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, project: (v1: T, v2: T2, v3: T3, v4: T4) => R): OperatorFunction<T, R>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3, T4, T5, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => R): OperatorFunction<T, R>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3, T4, T5, T6, R>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>, v6: ObservableInput<T6>, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => R): OperatorFunction<T, R>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2>(v2: ObservableInput<T2>): OperatorFunction<T, [T, T2]>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3>(v2: ObservableInput<T2>, v3: ObservableInput<T3>): OperatorFunction<T, [T, T2, T3]>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3, T4>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>): OperatorFunction<T, [T, T2, T3, T4]>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3, T4, T5>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>): OperatorFunction<T, [T, T2, T3, T4, T5]>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, T2, T3, T4, T5, T6>(v2: ObservableInput<T2>, v3: ObservableInput<T3>, v4: ObservableInput<T4>, v5: ObservableInput<T5>, v6: ObservableInput<T6>): OperatorFunction<T, [T, T2, T3, T4, T5, T6]>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, R>(...observables: Array<ObservableInput<T> | ((...values: Array<T>) => R)>): OperatorFunction<T, R>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, R>(array: ObservableInput<T>[]): OperatorFunction<T, Array<T>>;
/** @deprecated Deprecated in favor of static combineLatest. */
export declare function combineLatest<T, TOther, R>(array: ObservableInput<TOther>[], project: (v1: T, ...values: Array<TOther>) => R): OperatorFunction<T, R>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeMap.js","sources":["../../src/add/operator/mergeMap.ts"],"names":[],"mappings":";;AAAA,6CAA2C"}

View File

@@ -0,0 +1,46 @@
{
"name": "os-name",
"version": "4.0.0",
"description": "Get the name of the current operating system. Example: macOS Sierra",
"license": "MIT",
"repository": "sindresorhus/os-name",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=10"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"os",
"operating",
"system",
"platform",
"name",
"title",
"release",
"version",
"macos",
"windows",
"linux"
],
"dependencies": {
"macos-release": "^2.2.0",
"windows-release": "^4.0.0"
},
"devDependencies": {
"@types/node": "^14.6.2",
"ava": "^2.4.0",
"tsd": "^0.13.1",
"xo": "^0.33.0"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"windowCount.js","sources":["../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAkErC,MAAM,UAAU,WAAW,CAAI,UAAkB,EAClB,mBAA2B,CAAC;IACzD,OAAO,SAAS,2BAA2B,CAAC,MAAqB;QAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAI,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAC/E,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,mBAAmB;IAEvB,YAAoB,UAAkB,EAClB,gBAAwB;QADxB,eAAU,GAAV,UAAU,CAAQ;QAClB,qBAAgB,GAAhB,gBAAgB,CAAQ;IAC5C,CAAC;IAED,IAAI,CAAC,UAAqC,EAAE,MAAW;QACrD,OAAO,MAAM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AAI,CAAI,KAAa;IACnC,OAAO,UAAC,MAAqB,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC,EAApC,CAAoC,CAAC;AACzE,CAAC;AAED;IACE,sBAAoB,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IACjC,CAAC;IAED,2BAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,CAAC;IACH,mBAAC;AAAD,CAAC,AAPD,IAOC;AAOD;IAAgC,0CAAa;IAG3C,wBAAY,WAA0B,EAAU,KAAa;QAA7D,YACE,kBAAM,WAAW,CAAC,SACnB;QAF+C,WAAK,GAAL,KAAK,CAAQ;QAF7D,WAAK,GAAW,CAAC,CAAC;;IAIlB,CAAC;IAES,8BAAK,GAAf,UAAgB,CAAI;QAClB,IAAI,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;YAC7B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;SAC1B;IACH,CAAC;IACH,qBAAC;AAAD,CAAC,AAZD,CAAgC,UAAU,GAYzC"}

View File

@@ -0,0 +1,141 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var isArray_1 = require("./util/isArray");
var isObject_1 = require("./util/isObject");
var isFunction_1 = require("./util/isFunction");
var UnsubscriptionError_1 = require("./util/UnsubscriptionError");
var Subscription = (function () {
function Subscription(unsubscribe) {
this.closed = false;
this._parentOrParents = null;
this._subscriptions = null;
if (unsubscribe) {
this._ctorUnsubscribe = true;
this._unsubscribe = unsubscribe;
}
}
Subscription.prototype.unsubscribe = function () {
var errors;
if (this.closed) {
return;
}
var _a = this, _parentOrParents = _a._parentOrParents, _ctorUnsubscribe = _a._ctorUnsubscribe, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
this.closed = true;
this._parentOrParents = null;
this._subscriptions = null;
if (_parentOrParents instanceof Subscription) {
_parentOrParents.remove(this);
}
else if (_parentOrParents !== null) {
for (var index = 0; index < _parentOrParents.length; ++index) {
var parent_1 = _parentOrParents[index];
parent_1.remove(this);
}
}
if (isFunction_1.isFunction(_unsubscribe)) {
if (_ctorUnsubscribe) {
this._unsubscribe = undefined;
}
try {
_unsubscribe.call(this);
}
catch (e) {
errors = e instanceof UnsubscriptionError_1.UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
}
}
if (isArray_1.isArray(_subscriptions)) {
var index = -1;
var len = _subscriptions.length;
while (++index < len) {
var sub = _subscriptions[index];
if (isObject_1.isObject(sub)) {
try {
sub.unsubscribe();
}
catch (e) {
errors = errors || [];
if (e instanceof UnsubscriptionError_1.UnsubscriptionError) {
errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
}
else {
errors.push(e);
}
}
}
}
}
if (errors) {
throw new UnsubscriptionError_1.UnsubscriptionError(errors);
}
};
Subscription.prototype.add = function (teardown) {
var subscription = teardown;
if (!teardown) {
return Subscription.EMPTY;
}
switch (typeof teardown) {
case 'function':
subscription = new Subscription(teardown);
case 'object':
if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
return subscription;
}
else if (this.closed) {
subscription.unsubscribe();
return subscription;
}
else if (!(subscription instanceof Subscription)) {
var tmp = subscription;
subscription = new Subscription();
subscription._subscriptions = [tmp];
}
break;
default: {
throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
}
}
var _parentOrParents = subscription._parentOrParents;
if (_parentOrParents === null) {
subscription._parentOrParents = this;
}
else if (_parentOrParents instanceof Subscription) {
if (_parentOrParents === this) {
return subscription;
}
subscription._parentOrParents = [_parentOrParents, this];
}
else if (_parentOrParents.indexOf(this) === -1) {
_parentOrParents.push(this);
}
else {
return subscription;
}
var subscriptions = this._subscriptions;
if (subscriptions === null) {
this._subscriptions = [subscription];
}
else {
subscriptions.push(subscription);
}
return subscription;
};
Subscription.prototype.remove = function (subscription) {
var subscriptions = this._subscriptions;
if (subscriptions) {
var subscriptionIndex = subscriptions.indexOf(subscription);
if (subscriptionIndex !== -1) {
subscriptions.splice(subscriptionIndex, 1);
}
}
};
Subscription.EMPTY = (function (empty) {
empty.closed = true;
return empty;
}(new Subscription()));
return Subscription;
}());
exports.Subscription = Subscription;
function flattenUnsubscriptionErrors(errors) {
return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError_1.UnsubscriptionError) ? err.errors : err); }, []);
}
//# sourceMappingURL=Subscription.js.map

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"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","2":"C K","132":"L H M N O"},C:{"1":"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","2":"0 1 2 3 4 5 6 CC tB I u J E F G A B C K L H M N O v w x y z DC EC","132":"7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},D:{"1":"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","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","132":"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"},E:{"1":"A B C K L H KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E GC zB HC IC","132":"F G JC"},F:{"1":"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","2":"G B C H M N O v w x y OC PC QC RC qB 9B SC rB","132":"0 1 2 3 4 5 6 7 8 9 z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},G:{"1":"YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"zB TC AC UC VC WC","16":"F","132":"XC"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"1":"A","2":"E"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"0B 0C 1C 2C 3C 4C sB 5C 6C 7C","132":"I vC wC xC yC zC"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:1,C:"Path2D"};

View File

@@ -0,0 +1,25 @@
import { Observable } from '../Observable';
import { ReplaySubject } from '../ReplaySubject';
import { multicast } from './multicast';
import { ConnectableObservable } from '../observable/ConnectableObservable';
import { UnaryFunction, MonoTypeOperatorFunction, OperatorFunction, SchedulerLike, ObservableInput, ObservedValueOf } from '../types';
/* tslint:disable:max-line-length */
export function publishReplay<T>(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;
export function publishReplay<T, O extends ObservableInput<any>>(bufferSize?: number, windowTime?: number, selector?: (shared: Observable<T>) => O, scheduler?: SchedulerLike): OperatorFunction<T, ObservedValueOf<O>>;
/* tslint:enable:max-line-length */
export function publishReplay<T, R>(bufferSize?: number,
windowTime?: number,
selectorOrScheduler?: SchedulerLike | OperatorFunction<T, R>,
scheduler?: SchedulerLike): UnaryFunction<Observable<T>, ConnectableObservable<R>> {
if (selectorOrScheduler && typeof selectorOrScheduler !== 'function') {
scheduler = selectorOrScheduler;
}
const selector = typeof selectorOrScheduler === 'function' ? selectorOrScheduler : undefined;
const subject = new ReplaySubject<T>(bufferSize, windowTime, scheduler);
return (source: Observable<T>) => multicast(() => subject, selector)(source) as ConnectableObservable<R>;
}

View File

@@ -0,0 +1,58 @@
export { config } from '../internal/config';
export { InnerSubscriber } from '../internal/InnerSubscriber';
export { OuterSubscriber } from '../internal/OuterSubscriber';
export { Scheduler } from '../internal/Scheduler';
export { AnonymousSubject } from '../internal/Subject';
export { SubjectSubscription } from '../internal/SubjectSubscription';
export { Subscriber } from '../internal/Subscriber';
export { fromPromise } from '../internal/observable/fromPromise';
export { fromIterable } from '../internal/observable/fromIterable';
export { ajax } from '../internal/observable/dom/ajax';
export { webSocket } from '../internal/observable/dom/webSocket';
export { AjaxRequest, AjaxCreationMethod, ajaxGet, ajaxPost, ajaxDelete, ajaxPut, ajaxPatch, ajaxGetJSON, AjaxObservable, AjaxSubscriber, AjaxResponse, AjaxError, AjaxTimeoutError } from '../internal/observable/dom/AjaxObservable';
export { WebSocketSubjectConfig, WebSocketSubject } from '../internal/observable/dom/WebSocketSubject';
export { CombineLatestOperator } from '../internal/observable/combineLatest';
export { EventTargetLike } from '../internal/observable/fromEvent';
export { ConditionFunc, IterateFunc, ResultFunc, GenerateBaseOptions, GenerateOptions } from '../internal/observable/generate';
export { dispatch } from '../internal/observable/range';
export { SubscribeOnObservable } from '../internal/observable/SubscribeOnObservable';
export { Timestamp } from '../internal/operators/timestamp';
export { TimeInterval } from '../internal/operators/timeInterval';
export { GroupedObservable } from '../internal/operators/groupBy';
export { ShareReplayConfig } from '../internal/operators/shareReplay';
export { ThrottleConfig, defaultThrottleConfig } from '../internal/operators/throttle';
export { rxSubscriber } from '../internal/symbol/rxSubscriber';
export { iterator } from '../internal/symbol/iterator';
export { observable } from '../internal/symbol/observable';
export { ArgumentOutOfRangeError } from '../internal/util/ArgumentOutOfRangeError';
export { EmptyError } from '../internal/util/EmptyError';
export { Immediate } from '../internal/util/Immediate';
export { ObjectUnsubscribedError } from '../internal/util/ObjectUnsubscribedError';
export { TimeoutError } from '../internal/util/TimeoutError';
export { UnsubscriptionError } from '../internal/util/UnsubscriptionError';
export { applyMixins } from '../internal/util/applyMixins';
export { errorObject } from '../internal/util/errorObject';
export { hostReportError } from '../internal/util/hostReportError';
export { identity } from '../internal/util/identity';
export { isArray } from '../internal/util/isArray';
export { isArrayLike } from '../internal/util/isArrayLike';
export { isDate } from '../internal/util/isDate';
export { isFunction } from '../internal/util/isFunction';
export { isIterable } from '../internal/util/isIterable';
export { isNumeric } from '../internal/util/isNumeric';
export { isObject } from '../internal/util/isObject';
export { isInteropObservable as isObservable } from '../internal/util/isInteropObservable';
export { isPromise } from '../internal/util/isPromise';
export { isScheduler } from '../internal/util/isScheduler';
export { noop } from '../internal/util/noop';
export { not } from '../internal/util/not';
export { pipe } from '../internal/util/pipe';
export { root } from '../internal/util/root';
export { subscribeTo } from '../internal/util/subscribeTo';
export { subscribeToArray } from '../internal/util/subscribeToArray';
export { subscribeToIterable } from '../internal/util/subscribeToIterable';
export { subscribeToObservable } from '../internal/util/subscribeToObservable';
export { subscribeToPromise } from '../internal/util/subscribeToPromise';
export { subscribeToResult } from '../internal/util/subscribeToResult';
export { toSubscriber } from '../internal/util/toSubscriber';
export { tryCatch } from '../internal/util/tryCatch';

View File

@@ -0,0 +1 @@
{"version":3,"file":"iif.js","sources":["../../../src/internal/observable/iif.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA2FhC,MAAM,UAAU,GAAG,CACjB,SAAwB,EACxB,UAA4C,EAC5C,WAA6C;IAD7C,2BAAA,EAAA,kBAA4C;IAC5C,4BAAA,EAAA,mBAA6C;IAE7C,OAAO,KAAK,CAAC,cAAM,OAAA,SAAS,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,EAAtC,CAAsC,CAAC,CAAC;AAC7D,CAAC"}

View File

@@ -0,0 +1,13 @@
/** PURE_IMPORTS_START _Observable,_util_subscribeToPromise,_scheduled_schedulePromise PURE_IMPORTS_END */
import { Observable } from '../Observable';
import { subscribeToPromise } from '../util/subscribeToPromise';
import { schedulePromise } from '../scheduled/schedulePromise';
export function fromPromise(input, scheduler) {
if (!scheduler) {
return new Observable(subscribeToPromise(input));
}
else {
return schedulePromise(input, scheduler);
}
}
//# sourceMappingURL=fromPromise.js.map

View File

@@ -0,0 +1,51 @@
# log-symbols
<img src="screenshot.png" width="226" height="192" align="right">
> Colored symbols for various log levels
Includes fallbacks for Windows CMD which only supports a [limited character set](https://en.wikipedia.org/wiki/Code_page_437).
## Install
```
$ npm install log-symbols
```
## Usage
```js
const logSymbols = require('log-symbols');
console.log(logSymbols.success, 'Finished successfully!');
// Terminals with Unicode support: ✔ Finished successfully!
// Terminals without Unicode support: √ Finished successfully!
```
## API
### logSymbols
#### info
#### success
#### warning
#### error
## Related
- [figures](https://github.com/sindresorhus/figures) - Unicode symbols with Windows CMD fallbacks
- [py-log-symbols](https://github.com/ManrajGrover/py-log-symbols) - Python port
- [log-symbols](https://github.com/palash25/log-symbols) - Ruby port
- [guumaster/logsymbols](https://github.com/guumaster/logsymbols) - Golang port
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-log-symbols?utm_source=npm-log-symbols&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View File

@@ -0,0 +1,99 @@
# duplexer3
Like [`duplexer2`](https://github.com/deoxxa/duplexer2) but using Streams3 without readable-stream dependency
```js
var stream = require("stream");
var duplexer3 = require("duplexer3");
var writable = new stream.Writable({objectMode: true}),
readable = new stream.Readable({objectMode: true});
writable._write = function _write(input, encoding, done) {
if (readable.push(input)) {
return done();
} else {
readable.once("drain", done);
}
};
readable._read = function _read(n) {
// no-op
};
// simulate the readable thing closing after a bit
writable.once("finish", function() {
setTimeout(function() {
readable.push(null);
}, 500);
});
var duplex = duplexer3(writable, readable);
duplex.on("data", function(e) {
console.log("got data", JSON.stringify(e));
});
duplex.on("finish", function() {
console.log("got finish event");
});
duplex.on("end", function() {
console.log("got end event");
});
duplex.write("oh, hi there", function() {
console.log("finished writing");
});
duplex.end(function() {
console.log("finished ending");
});
```
```
got data "oh, hi there"
finished writing
got finish event
finished ending
got end event
```
## Overview
This is a reimplementation of [duplexer](https://www.npmjs.com/package/duplexer) using the
Streams3 API which is standard in Node as of v4. Everything largely
works the same.
## Install
```sh
npm install duplexer3
```
## API
### duplexer3
Creates a new `DuplexWrapper` object, which is the actual class that implements
most of the fun stuff. All that fun stuff is hidden. DON'T LOOK.
```js
duplexer3([options], writable, readable)
```
```js
const duplex = duplexer3(new stream.Writable(), new stream.Readable());
```
Arguments
* __options__ - an object specifying the regular `stream.Duplex` options, as
well as the properties described below.
* __writable__ - a writable stream
* __readable__ - a readable stream
Options
* __bubbleErrors__ - a boolean value that specifies whether to bubble errors
from the underlying readable/writable streams. Default is `true`.

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"H M N O 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","2":"C","388":"K L"},C:{"1":"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 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","2":"CC tB I u J E F G A B C K L H M N O v w x DC EC"},D:{"1":"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","2":"0 1 I u J E F G A B C K L H M N O v w x y z","132":"2 3 4 5 6 7 8 9 AB"},E:{"1":"G A B C K L H KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E GC zB HC","388":"F JC","514":"IC"},F:{"1":"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 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","2":"G B C OC PC QC RC qB 9B SC rB","132":"H M N O v w x"},G:{"1":"YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"zB TC AC UC VC WC","388":"F XC"},H:{"2":"nC"},I:{"1":"D sC tC","2":"tB I oC pC qC rC AC"},J:{"2":"E A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:1,C:"HTML templates"};

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"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","2":"C K L","4097":"M N O","4290":"H"},C:{"1":"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","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 DC EC","322":"UB VB WB XB YB uB"},D:{"1":"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","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","194":"ZB"},E:{"1":"B C K L H qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E F G A GC zB HC IC JC KC","3076":"0B"},F:{"1":"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","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 OC PC QC RC qB 9B SC rB","194":"NB"},G:{"1":"cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"F zB TC AC UC VC WC XC YC ZC aC","3076":"bC"},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:{"1":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C","2":"I vC wC xC"},Q:{"1":"1B"},R:{"1":"8C"},S:{"2":"9C"}},B:1,C:"JavaScript modules via script tag"};

View File

@@ -0,0 +1,18 @@
/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */
import { concat } from '../observable/concat';
import { isScheduler } from '../util/isScheduler';
export function startWith() {
var array = [];
for (var _i = 0; _i < arguments.length; _i++) {
array[_i] = arguments[_i];
}
var scheduler = array[array.length - 1];
if (isScheduler(scheduler)) {
array.pop();
return function (source) { return concat(array, source, scheduler); };
}
else {
return function (source) { return concat(array, source); };
}
}
//# sourceMappingURL=startWith.js.map

View File

@@ -0,0 +1,45 @@
import { OperatorFunction } from '../types';
/**
* Groups pairs of consecutive emissions together and emits them as an array of
* two values.
*
* <span class="informal">Puts the current value and previous value together as
* an array, and emits that.</span>
*
* ![](pairwise.png)
*
* The Nth emission from the source Observable will cause the output Observable
* to emit an array [(N-1)th, Nth] of the previous and the current value, as a
* pair. For this reason, `pairwise` emits on the second and subsequent
* emissions from the source Observable, but not on the first emission, because
* there is no previous value in that case.
*
* ## Example
* On every click (starting from the second), emit the relative distance to the previous click
* ```ts
* import { fromEvent } from 'rxjs';
* import { pairwise, map } from 'rxjs/operators';
*
* const clicks = fromEvent(document, 'click');
* const pairs = clicks.pipe(pairwise());
* const distance = pairs.pipe(
* map(pair => {
* const x0 = pair[0].clientX;
* const y0 = pair[0].clientY;
* const x1 = pair[1].clientX;
* const y1 = pair[1].clientY;
* return Math.sqrt(Math.pow(x0 - x1, 2) + Math.pow(y0 - y1, 2));
* }),
* );
* distance.subscribe(x => console.log(x));
* ```
*
* @see {@link buffer}
* @see {@link bufferCount}
*
* @return {Observable<Array<T>>} An Observable of pairs (as arrays) of
* consecutive values from the source Observable.
* @method pairwise
* @owner Observable
*/
export declare function pairwise<T>(): OperatorFunction<T, [T, T]>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"finalize.js","sources":["../src/operators/finalize.ts"],"names":[],"mappings":";;;;;AAAA,oDAA+C"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"root.js","sources":["../../../src/internal/util/root.ts"],"names":[],"mappings":"AAeA,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC;AACzD,MAAM,MAAM,GAAG,OAAO,IAAI,KAAK,WAAW,IAAI,OAAO,iBAAiB,KAAK,WAAW;IAClF,IAAI,YAAY,iBAAiB,IAAI,IAAI,CAAC;AAC9C,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC;AACzD,MAAM,KAAK,GAAQ,QAAQ,IAAI,QAAQ,IAAI,MAAM,CAAC;AAKlD,CAAC;IACC,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;KAClF;AACH,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAE,KAAK,IAAI,IAAI,EAAE,CAAC"}

View File

@@ -0,0 +1,6 @@
import assertString from './util/assertString';
var isBICReg = /^[A-z]{4}[A-z]{2}\w{2}(\w{3})?$/;
export default function isBIC(str) {
assertString(str);
return isBICReg.test(str);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"bufferWhen.js","sources":["../src/operators/bufferWhen.ts"],"names":[],"mappings":";;;;;AAAA,sDAAiD"}

View File

@@ -0,0 +1,4 @@
/** PURE_IMPORTS_START PURE_IMPORTS_END */
export { webSocket as webSocket } from '../internal/observable/dom/webSocket';
export { WebSocketSubject } from '../internal/observable/dom/WebSocketSubject';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../src/testing/index.ts"],"names":[],"mappings":";;AAAA,mEAAkE;AAAzD,wCAAA,aAAa,CAAA"}