new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import {ArrayEntry, MapEntry, ObjectEntry, SetEntry} from './entry';
|
||||
|
||||
type ArrayEntries<BaseType extends readonly unknown[]> = Array<ArrayEntry<BaseType>>;
|
||||
type MapEntries<BaseType> = Array<MapEntry<BaseType>>;
|
||||
type ObjectEntries<BaseType> = Array<ObjectEntry<BaseType>>;
|
||||
type SetEntries<BaseType extends Set<unknown>> = Array<SetEntry<BaseType>>;
|
||||
|
||||
/**
|
||||
Many collections have an `entries` method which returns an array of a given object's own enumerable string-keyed property [key, value] pairs. The `Entries` type will return the type of that collection's entries.
|
||||
|
||||
For example the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries|`Object`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/entries|`Map`}, {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/entries|`Array`}, and {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/entries|`Set`} collections all have this method. Note that `WeakMap` and `WeakSet` do not have this method since their entries are not enumerable.
|
||||
|
||||
@see `Entry` if you want to just access the type of a single entry.
|
||||
|
||||
@example
|
||||
```
|
||||
import {Entries} from 'type-fest';
|
||||
|
||||
interface Example {
|
||||
someKey: number;
|
||||
}
|
||||
|
||||
const manipulatesEntries = (examples: Entries<Example>) => examples.map(example => [
|
||||
// Does some arbitrary processing on the key (with type information available)
|
||||
example[0].toUpperCase(),
|
||||
|
||||
// Does some arbitrary processing on the value (with type information available)
|
||||
example[1].toFixed()
|
||||
]);
|
||||
|
||||
const example: Example = {someKey: 1};
|
||||
const entries = Object.entries(example) as Entries<Example>;
|
||||
const output = manipulatesEntries(entries);
|
||||
|
||||
// Objects
|
||||
const objectExample = {a: 1};
|
||||
const objectEntries: Entries<typeof objectExample> = [['a', 1]];
|
||||
|
||||
// Arrays
|
||||
const arrayExample = ['a', 1];
|
||||
const arrayEntries: Entries<typeof arrayExample> = [[0, 'a'], [1, 1]];
|
||||
|
||||
// Maps
|
||||
const mapExample = new Map([['a', 1]]);
|
||||
const mapEntries: Entries<typeof map> = [['a', 1]];
|
||||
|
||||
// Sets
|
||||
const setExample = new Set(['a', 1]);
|
||||
const setEntries: Entries<typeof setExample> = [['a', 'a'], [1, 1]];
|
||||
```
|
||||
*/
|
||||
export type Entries<BaseType> =
|
||||
BaseType extends Map<unknown, unknown> ? MapEntries<BaseType>
|
||||
: BaseType extends Set<unknown> ? SetEntries<BaseType>
|
||||
: BaseType extends unknown[] ? ArrayEntries<BaseType>
|
||||
: BaseType extends object ? ObjectEntries<BaseType>
|
||||
: never;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineLatest.js","sources":["../src/observable/combineLatest.ts"],"names":[],"mappings":";;;;;AAAA,0DAAqD"}
|
||||
@@ -0,0 +1 @@
|
||||
import 'rxjs-compat/add/observable/combineLatest';
|
||||
@@ -0,0 +1,96 @@
|
||||
"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 Subject_1 = require("../Subject");
|
||||
var innerSubscribe_1 = require("../innerSubscribe");
|
||||
function repeatWhen(notifier) {
|
||||
return function (source) { return source.lift(new RepeatWhenOperator(notifier)); };
|
||||
}
|
||||
exports.repeatWhen = repeatWhen;
|
||||
var RepeatWhenOperator = (function () {
|
||||
function RepeatWhenOperator(notifier) {
|
||||
this.notifier = notifier;
|
||||
}
|
||||
RepeatWhenOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new RepeatWhenSubscriber(subscriber, this.notifier, source));
|
||||
};
|
||||
return RepeatWhenOperator;
|
||||
}());
|
||||
var RepeatWhenSubscriber = (function (_super) {
|
||||
__extends(RepeatWhenSubscriber, _super);
|
||||
function RepeatWhenSubscriber(destination, notifier, source) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.notifier = notifier;
|
||||
_this.source = source;
|
||||
_this.sourceIsBeingSubscribedTo = true;
|
||||
return _this;
|
||||
}
|
||||
RepeatWhenSubscriber.prototype.notifyNext = function () {
|
||||
this.sourceIsBeingSubscribedTo = true;
|
||||
this.source.subscribe(this);
|
||||
};
|
||||
RepeatWhenSubscriber.prototype.notifyComplete = function () {
|
||||
if (this.sourceIsBeingSubscribedTo === false) {
|
||||
return _super.prototype.complete.call(this);
|
||||
}
|
||||
};
|
||||
RepeatWhenSubscriber.prototype.complete = function () {
|
||||
this.sourceIsBeingSubscribedTo = false;
|
||||
if (!this.isStopped) {
|
||||
if (!this.retries) {
|
||||
this.subscribeToRetries();
|
||||
}
|
||||
if (!this.retriesSubscription || this.retriesSubscription.closed) {
|
||||
return _super.prototype.complete.call(this);
|
||||
}
|
||||
this._unsubscribeAndRecycle();
|
||||
this.notifications.next(undefined);
|
||||
}
|
||||
};
|
||||
RepeatWhenSubscriber.prototype._unsubscribe = function () {
|
||||
var _a = this, notifications = _a.notifications, retriesSubscription = _a.retriesSubscription;
|
||||
if (notifications) {
|
||||
notifications.unsubscribe();
|
||||
this.notifications = undefined;
|
||||
}
|
||||
if (retriesSubscription) {
|
||||
retriesSubscription.unsubscribe();
|
||||
this.retriesSubscription = undefined;
|
||||
}
|
||||
this.retries = undefined;
|
||||
};
|
||||
RepeatWhenSubscriber.prototype._unsubscribeAndRecycle = function () {
|
||||
var _unsubscribe = this._unsubscribe;
|
||||
this._unsubscribe = null;
|
||||
_super.prototype._unsubscribeAndRecycle.call(this);
|
||||
this._unsubscribe = _unsubscribe;
|
||||
return this;
|
||||
};
|
||||
RepeatWhenSubscriber.prototype.subscribeToRetries = function () {
|
||||
this.notifications = new Subject_1.Subject();
|
||||
var retries;
|
||||
try {
|
||||
var notifier = this.notifier;
|
||||
retries = notifier(this.notifications);
|
||||
}
|
||||
catch (e) {
|
||||
return _super.prototype.complete.call(this);
|
||||
}
|
||||
this.retries = retries;
|
||||
this.retriesSubscription = innerSubscribe_1.innerSubscribe(retries, new innerSubscribe_1.SimpleInnerSubscriber(this));
|
||||
};
|
||||
return RepeatWhenSubscriber;
|
||||
}(innerSubscribe_1.SimpleOuterSubscriber));
|
||||
//# sourceMappingURL=repeatWhen.js.map
|
||||
@@ -0,0 +1,117 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var canReportError_1 = require("./util/canReportError");
|
||||
var toSubscriber_1 = require("./util/toSubscriber");
|
||||
var observable_1 = require("./symbol/observable");
|
||||
var pipe_1 = require("./util/pipe");
|
||||
var config_1 = require("./config");
|
||||
var Observable = (function () {
|
||||
function Observable(subscribe) {
|
||||
this._isScalar = false;
|
||||
if (subscribe) {
|
||||
this._subscribe = subscribe;
|
||||
}
|
||||
}
|
||||
Observable.prototype.lift = function (operator) {
|
||||
var observable = new Observable();
|
||||
observable.source = this;
|
||||
observable.operator = operator;
|
||||
return observable;
|
||||
};
|
||||
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
|
||||
var operator = this.operator;
|
||||
var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete);
|
||||
if (operator) {
|
||||
sink.add(operator.call(sink, this.source));
|
||||
}
|
||||
else {
|
||||
sink.add(this.source || (config_1.config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
|
||||
this._subscribe(sink) :
|
||||
this._trySubscribe(sink));
|
||||
}
|
||||
if (config_1.config.useDeprecatedSynchronousErrorHandling) {
|
||||
if (sink.syncErrorThrowable) {
|
||||
sink.syncErrorThrowable = false;
|
||||
if (sink.syncErrorThrown) {
|
||||
throw sink.syncErrorValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
return sink;
|
||||
};
|
||||
Observable.prototype._trySubscribe = function (sink) {
|
||||
try {
|
||||
return this._subscribe(sink);
|
||||
}
|
||||
catch (err) {
|
||||
if (config_1.config.useDeprecatedSynchronousErrorHandling) {
|
||||
sink.syncErrorThrown = true;
|
||||
sink.syncErrorValue = err;
|
||||
}
|
||||
if (canReportError_1.canReportError(sink)) {
|
||||
sink.error(err);
|
||||
}
|
||||
else {
|
||||
console.warn(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
Observable.prototype.forEach = function (next, promiseCtor) {
|
||||
var _this = this;
|
||||
promiseCtor = getPromiseCtor(promiseCtor);
|
||||
return new promiseCtor(function (resolve, reject) {
|
||||
var subscription;
|
||||
subscription = _this.subscribe(function (value) {
|
||||
try {
|
||||
next(value);
|
||||
}
|
||||
catch (err) {
|
||||
reject(err);
|
||||
if (subscription) {
|
||||
subscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
}, reject, resolve);
|
||||
});
|
||||
};
|
||||
Observable.prototype._subscribe = function (subscriber) {
|
||||
var source = this.source;
|
||||
return source && source.subscribe(subscriber);
|
||||
};
|
||||
Observable.prototype[observable_1.observable] = function () {
|
||||
return this;
|
||||
};
|
||||
Observable.prototype.pipe = function () {
|
||||
var operations = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
operations[_i] = arguments[_i];
|
||||
}
|
||||
if (operations.length === 0) {
|
||||
return this;
|
||||
}
|
||||
return pipe_1.pipeFromArray(operations)(this);
|
||||
};
|
||||
Observable.prototype.toPromise = function (promiseCtor) {
|
||||
var _this = this;
|
||||
promiseCtor = getPromiseCtor(promiseCtor);
|
||||
return new promiseCtor(function (resolve, reject) {
|
||||
var value;
|
||||
_this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
|
||||
});
|
||||
};
|
||||
Observable.create = function (subscribe) {
|
||||
return new Observable(subscribe);
|
||||
};
|
||||
return Observable;
|
||||
}());
|
||||
exports.Observable = Observable;
|
||||
function getPromiseCtor(promiseCtor) {
|
||||
if (!promiseCtor) {
|
||||
promiseCtor = config_1.config.Promise || Promise;
|
||||
}
|
||||
if (!promiseCtor) {
|
||||
throw new Error('no Promise impl found');
|
||||
}
|
||||
return promiseCtor;
|
||||
}
|
||||
//# sourceMappingURL=Observable.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"isArrayLike.js","sources":["../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":";;AAAa,QAAA,WAAW,GAAG,CAAC,UAAI,CAAM,IAAwB,OAAA,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,EAA5D,CAA4D,CAAC,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"observeOn.js","sources":["../../../src/internal/operators/observeOn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAuD/C,MAAM,UAAU,SAAS,CAAI,SAAwB,EAAE,QAAgB,CAAC;IACtE,OAAO,SAAS,yBAAyB,CAAC,MAAqB;QAC7D,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,iBAAiB;IAC5B,YAAoB,SAAwB,EAAU,QAAgB,CAAC;QAAnD,cAAS,GAAT,SAAS,CAAe;QAAU,UAAK,GAAL,KAAK,CAAY;IACvE,CAAC;IAED,IAAI,CAAC,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,SAA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,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;SAChD;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACpC;QACD,IAAI,MAAM,GAAG,KAAK,CAAC;QACnB,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAI;gBACM,IAAA,sBAAO,CAAU;gBACzB,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;aACjC;YAAC,OAAO,GAAG,EAAE;gBACZ,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACpC;SACF;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;SACpB;QACD,IAAI,CAAC,MAAM,EAAE;YACX,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC9B;IACH,CAAC;IACH,qCAAC;AAAD,CAAC,AAzCD,CAAmD,uBAAU,GAyC5D"}
|
||||
@@ -0,0 +1,10 @@
|
||||
import type { LocaleDictionary, LocalesDictionary } from '../types/index';
|
||||
declare const $dictionary: import("svelte/store").Writable<LocalesDictionary>;
|
||||
export declare function getLocaleDictionary(locale: string): LocaleDictionary;
|
||||
export declare function getDictionary(): LocalesDictionary;
|
||||
export declare function hasLocaleDictionary(locale: string): boolean;
|
||||
export declare function getMessageFromDictionary(locale: string, id: string): any;
|
||||
export declare function getClosestAvailableLocale(refLocale: string): string | null;
|
||||
export declare function addMessages(locale: string, ...partials: LocaleDictionary[]): void;
|
||||
declare const $locales: import("svelte/store").Readable<string[]>;
|
||||
export { $dictionary, $locales };
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/util/isObservable';
|
||||
@@ -0,0 +1,46 @@
|
||||
import { Subscriber } from '../Subscriber';
|
||||
export function takeWhile(predicate, inclusive = false) {
|
||||
return (source) => source.lift(new TakeWhileOperator(predicate, inclusive));
|
||||
}
|
||||
class TakeWhileOperator {
|
||||
constructor(predicate, inclusive) {
|
||||
this.predicate = predicate;
|
||||
this.inclusive = inclusive;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new TakeWhileSubscriber(subscriber, this.predicate, this.inclusive));
|
||||
}
|
||||
}
|
||||
class TakeWhileSubscriber extends Subscriber {
|
||||
constructor(destination, predicate, inclusive) {
|
||||
super(destination);
|
||||
this.predicate = predicate;
|
||||
this.inclusive = inclusive;
|
||||
this.index = 0;
|
||||
}
|
||||
_next(value) {
|
||||
const destination = this.destination;
|
||||
let result;
|
||||
try {
|
||||
result = this.predicate(value, this.index++);
|
||||
}
|
||||
catch (err) {
|
||||
destination.error(err);
|
||||
return;
|
||||
}
|
||||
this.nextOrComplete(value, result);
|
||||
}
|
||||
nextOrComplete(value, predicateResult) {
|
||||
const destination = this.destination;
|
||||
if (Boolean(predicateResult)) {
|
||||
destination.next(value);
|
||||
}
|
||||
else {
|
||||
if (this.inclusive) {
|
||||
destination.next(value);
|
||||
}
|
||||
destination.complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=takeWhile.js.map
|
||||
@@ -0,0 +1,36 @@
|
||||
import { scheduleObservable } from './scheduleObservable';
|
||||
import { schedulePromise } from './schedulePromise';
|
||||
import { scheduleArray } from './scheduleArray';
|
||||
import { scheduleIterable } from './scheduleIterable';
|
||||
import { ObservableInput, SchedulerLike, Observable } from 'rxjs';
|
||||
import { isInteropObservable } from '../util/isInteropObservable';
|
||||
import { isPromise } from '../util/isPromise';
|
||||
import { isArrayLike } from '../util/isArrayLike';
|
||||
import { isIterable } from '../util/isIterable';
|
||||
|
||||
/**
|
||||
* Converts from a common {@link ObservableInput} type to an observable where subscription and emissions
|
||||
* are scheduled on the provided scheduler.
|
||||
*
|
||||
* @see from
|
||||
* @see of
|
||||
*
|
||||
* @param input The observable, array, promise, iterable, etc you would like to schedule
|
||||
* @param scheduler The scheduler to use to schedule the subscription and emissions from
|
||||
* the returned observable.
|
||||
*/
|
||||
export function scheduled<T>(input: ObservableInput<T>, scheduler: SchedulerLike): Observable<T> {
|
||||
if (input != null) {
|
||||
if (isInteropObservable(input)) {
|
||||
return scheduleObservable(input, scheduler);
|
||||
} else if (isPromise(input)) {
|
||||
return schedulePromise(input, scheduler);
|
||||
} else if (isArrayLike(input)) {
|
||||
return scheduleArray(input, scheduler);
|
||||
} else if (isIterable(input) || typeof input === 'string') {
|
||||
return scheduleIterable(input, scheduler);
|
||||
}
|
||||
}
|
||||
|
||||
throw new TypeError((input !== null && typeof input || input) + ' is not observable');
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pairs.js","sources":["../../src/add/observable/pairs.ts"],"names":[],"mappings":";;AAAA,4CAA0C"}
|
||||
@@ -0,0 +1,6 @@
|
||||
import { concat } from '../observable/concat';
|
||||
import { of } from '../observable/of';
|
||||
export function endWith(...array) {
|
||||
return (source) => concat(source, of(...array));
|
||||
}
|
||||
//# sourceMappingURL=endWith.js.map
|
||||
@@ -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/empty"));
|
||||
//# sourceMappingURL=empty.js.map
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
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).
|
||||
|
||||
@example
|
||||
```
|
||||
import logSymbols = require('log-symbols');
|
||||
|
||||
console.log(logSymbols.success, 'Finished successfully!');
|
||||
// Terminals with Unicode support: ✔ Finished successfully!
|
||||
// Terminals without Unicode support: √ Finished successfully!
|
||||
```
|
||||
*/
|
||||
declare const logSymbols: {
|
||||
readonly info: string;
|
||||
|
||||
readonly success: string;
|
||||
|
||||
readonly warning: string;
|
||||
|
||||
readonly error: string;
|
||||
};
|
||||
|
||||
export = logSymbols;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J E F G BC","132":"A B"},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","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"CC tB DC EC","33":"A B C K L H","36":"I u J E F G"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"A","8":"I u J E F G","33":"z","36":"B C K L H M N O v w x y"},E:{"1":"A B C K L H 0B qB rB 1B MC 2B 3B 4B 5B sB 6B 7B 8B NC","8":"I u J E GC zB HC IC","260":"F G JC KC","516":"LC"},F:{"1":"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","2":"G OC PC","8":"B C QC RC qB 9B SC rB"},G:{"1":"aC bC cC dC eC fC gC hC iC jC kC mC 2B 3B 4B 5B sB 6B 7B 8B","8":"zB TC AC UC VC WC","260":"F XC YC ZC","516":"lC"},H:{"2":"nC"},I:{"1":"D sC tC","8":"tB I oC pC qC rC AC"},J:{"1":"A","8":"E"},K:{"1":"e","2":"A","8":"B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"132":"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:2,C:"IndexedDB"};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skipUntil.js","sources":["../src/operator/skipUntil.ts"],"names":[],"mappings":";;;;;AAAA,oDAA+C"}
|
||||
@@ -0,0 +1,32 @@
|
||||
'use strict';
|
||||
const SPACES_REGEXP = / +/g;
|
||||
|
||||
const joinCommand = (file, args = []) => {
|
||||
if (!Array.isArray(args)) {
|
||||
return file;
|
||||
}
|
||||
|
||||
return [file, ...args].join(' ');
|
||||
};
|
||||
|
||||
// Handle `execa.command()`
|
||||
const parseCommand = command => {
|
||||
const tokens = [];
|
||||
for (const token of command.trim().split(SPACES_REGEXP)) {
|
||||
// Allow spaces to be escaped by a backslash if not meant as a delimiter
|
||||
const previousToken = tokens[tokens.length - 1];
|
||||
if (previousToken && previousToken.endsWith('\\')) {
|
||||
// Merge previous token with current one
|
||||
tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
|
||||
} else {
|
||||
tokens.push(token);
|
||||
}
|
||||
}
|
||||
|
||||
return tokens;
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
joinCommand,
|
||||
parseCommand
|
||||
};
|
||||
@@ -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.00824,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0.33768,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0.00824,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0.00412,"64":0,"65":0,"66":0,"67":0,"68":0.01235,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00824,"79":0,"80":0,"81":0,"82":0.00412,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00824,"90":0.01235,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.02059,"103":0.00412,"104":0.00412,"105":0.00412,"106":0.04118,"107":0.00824,"108":0.24708,"109":0.11942,"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.00824,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0.00824,"40":0.00824,"41":0.02059,"42":0.00824,"43":0.00824,"44":0.00824,"45":0.01235,"46":0.00824,"47":0.01647,"48":0.04942,"49":0.03294,"50":0.00824,"51":0.00824,"52":0.00824,"53":0.02059,"54":0.00824,"55":0.03294,"56":0.01235,"57":0.03294,"58":0.07412,"59":0.01235,"60":0.00824,"61":0.00412,"62":0.01235,"63":0.01647,"64":0,"65":0.00824,"66":0.00412,"67":0.00824,"68":0.00412,"69":0.59711,"70":0.19355,"71":0.00412,"72":0.19766,"73":0.02059,"74":0.26355,"75":0.03294,"76":0.00412,"77":0.00824,"78":0.1153,"79":0.10707,"80":0.02883,"81":0.02471,"83":0.08648,"84":0.01647,"85":0.06177,"86":0.13178,"87":0.03294,"88":0.01235,"89":0.01647,"90":0.0453,"91":0.14825,"92":0.1153,"93":0.01235,"94":0.01647,"95":0.01647,"96":0.0453,"97":0.08648,"98":0.94302,"99":0.15648,"100":0.0453,"101":0.04942,"102":0.04118,"103":0.12354,"104":0.04942,"105":0.05765,"106":0.0453,"107":0.14825,"108":0.78242,"109":0.53122,"110":0.00412,"111":0.00412,"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,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0.02059,"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,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.02059,"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,"15":0,"16":0.00412,"17":0.00824,"18":0.03294,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0.00412,"87":0.00412,"88":0,"89":0.00412,"90":0,"91":0,"92":0.01647,"93":0,"94":0,"95":0.00412,"96":0,"97":0.00412,"98":0,"99":0.00412,"100":0.00412,"101":0.02883,"102":0.00412,"103":0.00824,"104":0.00824,"105":0.01235,"106":0.02471,"107":0.09883,"108":1.47013,"109":0.97185},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0.00412,"10":0,"11":0,"12":0,"13":0.00824,"14":0.02883,"15":0.00824,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0.00412,"10.1":0,"11.1":0,"12.1":0.00412,"13.1":0.03294,"14.1":0.03294,"15.1":0.00824,"15.2-15.3":0.00824,"15.4":0.02059,"15.5":0.02883,"15.6":0.1153,"16.0":0.01647,"16.1":0.06177,"16.2":0.0906,"16.3":0.00824},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.03701,"5.0-5.1":0.0242,"6.0-6.1":0.03274,"7.0-7.1":0.02135,"8.1-8.4":0.02562,"9.0-9.2":0.10106,"9.3":0.05409,"10.0-10.2":0.04412,"10.3":1.49165,"11.0-11.2":0.27328,"11.3-11.4":0.07117,"12.0-12.1":0.11387,"12.2-12.5":0.39426,"13.0-13.1":0.03985,"13.2":0.03558,"13.3":0.14518,"13.4-13.7":0.65615,"14.0-14.4":0.93228,"14.5-14.8":0.86681,"15.0-15.1":0.47824,"15.2-15.3":0.46258,"15.4":0.72732,"15.5":0.54229,"15.6":1.05326,"16.0":0.91805,"16.1":2.37838,"16.2":1.58559,"16.3":0.15799},P:{"4":0,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0,"8.2":0,"9.2":0.01062,"10.1":0,"11.1-11.2":0,"12.0":0.01062,"13.0":0,"14.0":0.09555,"15.0":0,"16.0":0,"17.0":0.01062,"18.0":0.01062,"19.0":0.29726},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.04146,"4.2-4.3":0.12437,"4.4":0,"4.4.3-4.4.4":0.62183},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.13378,"9":0.57973,"10":0.04459,"11":4.72706,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.15293},Q:{"13.1":3.58214},O:{"0":9.51119},H:{"0":0.04455},L:{"0":48.94501},S:{"2.5":0}};
|
||||
@@ -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/operators/max"));
|
||||
//# sourceMappingURL=max.js.map
|
||||
@@ -0,0 +1,88 @@
|
||||
"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 innerSubscribe_1 = require("../innerSubscribe");
|
||||
function debounce(durationSelector) {
|
||||
return function (source) { return source.lift(new DebounceOperator(durationSelector)); };
|
||||
}
|
||||
exports.debounce = debounce;
|
||||
var DebounceOperator = (function () {
|
||||
function DebounceOperator(durationSelector) {
|
||||
this.durationSelector = durationSelector;
|
||||
}
|
||||
DebounceOperator.prototype.call = function (subscriber, source) {
|
||||
return source.subscribe(new DebounceSubscriber(subscriber, this.durationSelector));
|
||||
};
|
||||
return DebounceOperator;
|
||||
}());
|
||||
var DebounceSubscriber = (function (_super) {
|
||||
__extends(DebounceSubscriber, _super);
|
||||
function DebounceSubscriber(destination, durationSelector) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.durationSelector = durationSelector;
|
||||
_this.hasValue = false;
|
||||
return _this;
|
||||
}
|
||||
DebounceSubscriber.prototype._next = function (value) {
|
||||
try {
|
||||
var result = this.durationSelector.call(this, value);
|
||||
if (result) {
|
||||
this._tryNext(value, result);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
this.destination.error(err);
|
||||
}
|
||||
};
|
||||
DebounceSubscriber.prototype._complete = function () {
|
||||
this.emitValue();
|
||||
this.destination.complete();
|
||||
};
|
||||
DebounceSubscriber.prototype._tryNext = function (value, duration) {
|
||||
var subscription = this.durationSubscription;
|
||||
this.value = value;
|
||||
this.hasValue = true;
|
||||
if (subscription) {
|
||||
subscription.unsubscribe();
|
||||
this.remove(subscription);
|
||||
}
|
||||
subscription = innerSubscribe_1.innerSubscribe(duration, new innerSubscribe_1.SimpleInnerSubscriber(this));
|
||||
if (subscription && !subscription.closed) {
|
||||
this.add(this.durationSubscription = subscription);
|
||||
}
|
||||
};
|
||||
DebounceSubscriber.prototype.notifyNext = function () {
|
||||
this.emitValue();
|
||||
};
|
||||
DebounceSubscriber.prototype.notifyComplete = function () {
|
||||
this.emitValue();
|
||||
};
|
||||
DebounceSubscriber.prototype.emitValue = function () {
|
||||
if (this.hasValue) {
|
||||
var value = this.value;
|
||||
var subscription = this.durationSubscription;
|
||||
if (subscription) {
|
||||
this.durationSubscription = undefined;
|
||||
subscription.unsubscribe();
|
||||
this.remove(subscription);
|
||||
}
|
||||
this.value = undefined;
|
||||
this.hasValue = false;
|
||||
_super.prototype._next.call(this, value);
|
||||
}
|
||||
};
|
||||
return DebounceSubscriber;
|
||||
}(innerSubscribe_1.SimpleOuterSubscriber));
|
||||
//# sourceMappingURL=debounce.js.map
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operators/finalize';
|
||||
Reference in New Issue
Block a user