new license file version [CI SKIP]
This commit is contained in:
@@ -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,"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,"59":0,"60":0,"61":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.00369,"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,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.02585,"103":0,"104":0,"105":0,"106":0.02585,"107":0.00369,"108":0.25482,"109":0.14033,"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,"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.00369,"50":0,"51":0,"52":0,"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.00369,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.04432,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0.01108,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00369,"100":0,"101":0.00369,"102":0,"103":0.01477,"104":0.00369,"105":0.00369,"106":0.01847,"107":0.07755,"108":1.93144,"109":1.67662,"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,"29":0,"30":0,"31":0,"32":0,"33":0,"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,"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.1034,"94":0.0517,"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,"17":0,"18":0,"79":0,"80":0,"81":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,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0.00369,"106":0,"107":0.01477,"108":0.4247,"109":0.421},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.11079,"15":0.01847,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.00369,"13.1":0.02216,"14.1":0.09233,"15.1":0.02954,"15.2-15.3":0.04432,"15.4":0.25851,"15.5":0.46901,"15.6":3.98475,"16.0":0.17357,"16.1":0.78292,"16.2":1.82065,"16.3":0.1034},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02581,"10.0-10.2":0,"10.3":0.01721,"11.0-11.2":0,"11.3-11.4":0,"12.0-12.1":0,"12.2-12.5":0.33553,"13.0-13.1":0,"13.2":0,"13.3":0,"13.4-13.7":0.01721,"14.0-14.4":0.45598,"14.5-14.8":0.72269,"15.0-15.1":0.2495,"15.2-15.3":0.55922,"15.4":0.83454,"15.5":2.77031,"15.6":16.1659,"16.0":10.24672,"16.1":30.55088,"16.2":15.89919,"16.3":0.80872},P:{"4":0,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0,"13.0":0,"14.0":0,"15.0":0,"16.0":0.01037,"17.0":0.01037,"18.0":0,"19.0":0.88117},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.01434,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.02151},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00369,"5.5":0},J:{"7":0,"10":0},N:{"10":0,"11":0},R:{_:"0"},M:{"0":0.06938},Q:{"13.1":0},O:{"0":0},H:{"0":0.00597},L:{"0":5.54443},S:{"2.5":0}};
|
||||
@@ -0,0 +1,25 @@
|
||||
import { map } from './map';
|
||||
export function pluck(...properties) {
|
||||
const length = properties.length;
|
||||
if (length === 0) {
|
||||
throw new Error('list of properties cannot be empty.');
|
||||
}
|
||||
return (source) => map(plucker(properties, length))(source);
|
||||
}
|
||||
function plucker(props, length) {
|
||||
const mapper = (x) => {
|
||||
let currentProp = x;
|
||||
for (let i = 0; i < length; i++) {
|
||||
const p = currentProp != null ? currentProp[props[i]] : undefined;
|
||||
if (p !== void 0) {
|
||||
currentProp = p;
|
||||
}
|
||||
else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return currentProp;
|
||||
};
|
||||
return mapper;
|
||||
}
|
||||
//# sourceMappingURL=pluck.js.map
|
||||
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const alreadyWarned = new Set();
|
||||
exports.default = (message) => {
|
||||
if (alreadyWarned.has(message)) {
|
||||
return;
|
||||
}
|
||||
alreadyWarned.add(message);
|
||||
// @ts-expect-error Missing types.
|
||||
process.emitWarning(`Got: ${message}`, {
|
||||
type: 'DeprecationWarning'
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"switchMapTo.js","sources":["../../src/add/operator/switchMapTo.ts"],"names":[],"mappings":";;AAAA,gDAA8C"}
|
||||
@@ -0,0 +1,31 @@
|
||||
export interface EmptyError extends Error {
|
||||
}
|
||||
|
||||
export interface EmptyErrorCtor {
|
||||
new(): EmptyError;
|
||||
}
|
||||
|
||||
const EmptyErrorImpl = (() => {
|
||||
function EmptyErrorImpl(this: any) {
|
||||
Error.call(this);
|
||||
this.message = 'no elements in sequence';
|
||||
this.name = 'EmptyError';
|
||||
return this;
|
||||
}
|
||||
|
||||
EmptyErrorImpl.prototype = Object.create(Error.prototype);
|
||||
|
||||
return EmptyErrorImpl;
|
||||
})();
|
||||
|
||||
/**
|
||||
* An error thrown when an Observable or a sequence was queried but has no
|
||||
* elements.
|
||||
*
|
||||
* @see {@link first}
|
||||
* @see {@link last}
|
||||
* @see {@link single}
|
||||
*
|
||||
* @class EmptyError
|
||||
*/
|
||||
export const EmptyError: EmptyErrorCtor = EmptyErrorImpl as any;
|
||||
@@ -0,0 +1 @@
|
||||
import 'rxjs-compat/add/observable/using';
|
||||
@@ -0,0 +1,199 @@
|
||||
/// <reference types="node"/>
|
||||
import {Agent as HttpAgent} from 'http';
|
||||
import {Agent as HttpsAgent} from 'https';
|
||||
|
||||
declare class VersionNotFoundErrorClass extends Error {
|
||||
readonly name: 'VersionNotFoundError';
|
||||
|
||||
constructor(packageName: string, version: string);
|
||||
}
|
||||
|
||||
declare class PackageNotFoundErrorClass extends Error {
|
||||
readonly name: 'PackageNotFoundError';
|
||||
|
||||
constructor(packageName: string);
|
||||
}
|
||||
|
||||
declare namespace packageJson {
|
||||
interface Agents {
|
||||
http?: HttpAgent;
|
||||
https?: HttpsAgent;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
Package version such as `1.0.0` or a [dist tag](https://docs.npmjs.com/cli/dist-tag) such as `latest`.
|
||||
|
||||
The version can also be in any format supported by the [semver](https://github.com/npm/node-semver) module. For example:
|
||||
- `1` - Get the latest `1.x.x`
|
||||
- `1.2` - Get the latest `1.2.x`
|
||||
- `^1.2.3` - Get the latest `1.x.x` but at least `1.2.3`
|
||||
- `~1.2.3` - Get the latest `1.2.x` but at least `1.2.3`
|
||||
|
||||
@default 'latest'
|
||||
*/
|
||||
readonly version?: string;
|
||||
|
||||
/**
|
||||
By default, only an abbreviated metadata object is returned for performance reasons. [Read more.](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md)
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly fullMetadata?: boolean;
|
||||
|
||||
/**
|
||||
Return the [main entry](https://registry.npmjs.org/ava) containing all versions.
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly allVersions?: boolean;
|
||||
|
||||
/**
|
||||
The registry URL is by default inferred from the npm defaults and `.npmrc`. This is beneficial as `package-json` and any project using it will work just like npm. This option is*only** intended for internal tools. You should*not** use this option in reusable packages. Prefer just using `.npmrc` whenever possible.
|
||||
*/
|
||||
readonly registryUrl?: string;
|
||||
|
||||
/**
|
||||
Overwrite the `agent` option that is passed down to [`got`](https://github.com/sindresorhus/got#agent). This might be useful to add [proxy support](https://github.com/sindresorhus/got#proxies).
|
||||
*/
|
||||
readonly agent?: HttpAgent | HttpsAgent | Agents | false;
|
||||
}
|
||||
|
||||
interface FullMetadataOptions extends Options {
|
||||
/**
|
||||
By default, only an abbreviated metadata object is returned for performance reasons. [Read more.](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md)
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly fullMetadata: true;
|
||||
}
|
||||
|
||||
interface DistTags {
|
||||
readonly latest: string;
|
||||
readonly [tagName: string]: string;
|
||||
}
|
||||
|
||||
interface AbbreviatedMetadata {
|
||||
readonly 'dist-tags': DistTags;
|
||||
readonly modified: string;
|
||||
readonly name: string;
|
||||
readonly versions: {readonly [version: string]: AbbreviatedVersion};
|
||||
readonly [key: string]: unknown;
|
||||
}
|
||||
|
||||
interface AbbreviatedVersion {
|
||||
readonly name: string;
|
||||
readonly version: string;
|
||||
readonly dist: {
|
||||
readonly shasum: string;
|
||||
readonly tarball: string;
|
||||
readonly integrity?: string;
|
||||
};
|
||||
readonly deprecated?: string;
|
||||
readonly dependencies?: {readonly [name: string]: string};
|
||||
readonly optionalDependencies?: {readonly [name: string]: string};
|
||||
readonly devDependencies?: {readonly [name: string]: string};
|
||||
readonly bundleDependencies?: {readonly [name: string]: string};
|
||||
readonly peerDependencies?: {readonly [name: string]: string};
|
||||
readonly bin?: {readonly [key: string]: string};
|
||||
readonly directories?: readonly string[];
|
||||
readonly engines?: {readonly [type: string]: string};
|
||||
readonly _hasShrinkwrap?: boolean;
|
||||
readonly [key: string]: unknown;
|
||||
}
|
||||
|
||||
interface Person {
|
||||
readonly name?: string;
|
||||
readonly email?: string;
|
||||
readonly url?: string;
|
||||
}
|
||||
|
||||
interface HoistedData {
|
||||
readonly author?: Person;
|
||||
readonly bugs?:
|
||||
| {readonly url: string; readonly email?: string}
|
||||
| {readonly url?: string; readonly email: string};
|
||||
readonly contributors?: readonly Person[];
|
||||
readonly description?: string;
|
||||
readonly homepage?: string;
|
||||
readonly keywords?: readonly string[];
|
||||
readonly license?: string;
|
||||
readonly maintainers?: readonly Person[];
|
||||
readonly readme?: string;
|
||||
readonly readmeFilename?: string;
|
||||
readonly repository?: {readonly type: string; readonly url: string};
|
||||
}
|
||||
|
||||
interface FullMetadata extends AbbreviatedMetadata, HoistedData {
|
||||
readonly _id: string;
|
||||
readonly _rev: string;
|
||||
readonly time: {
|
||||
readonly created: string;
|
||||
readonly modified: string;
|
||||
readonly [version: string]: string;
|
||||
};
|
||||
readonly users?: {readonly [user: string]: boolean};
|
||||
readonly versions: {readonly [version: string]: FullVersion};
|
||||
readonly [key: string]: unknown;
|
||||
}
|
||||
|
||||
interface FullVersion extends AbbreviatedVersion, HoistedData {
|
||||
readonly _id: string;
|
||||
readonly _nodeVersion: string;
|
||||
readonly _npmUser: string;
|
||||
readonly _npmVersion: string;
|
||||
readonly main?: string;
|
||||
readonly files?: readonly string[];
|
||||
readonly man?: readonly string[];
|
||||
readonly scripts?: {readonly [scriptName: string]: string};
|
||||
readonly gitHead?: string;
|
||||
readonly types?: string;
|
||||
readonly typings?: string;
|
||||
readonly [key: string]: unknown;
|
||||
}
|
||||
|
||||
type VersionNotFoundError = VersionNotFoundErrorClass;
|
||||
type PackageNotFoundError = PackageNotFoundErrorClass;
|
||||
}
|
||||
|
||||
declare const packageJson: {
|
||||
/**
|
||||
Get metadata of a package from the npm registry.
|
||||
|
||||
@param packageName - Name of the package.
|
||||
|
||||
@example
|
||||
```
|
||||
import packageJson = require('package-json');
|
||||
|
||||
(async () => {
|
||||
console.log(await packageJson('ava'));
|
||||
//=> {name: 'ava', ...}
|
||||
|
||||
// Also works with scoped packages
|
||||
console.log(await packageJson('@sindresorhus/df'));
|
||||
})();
|
||||
```
|
||||
*/
|
||||
(packageName: string, options: packageJson.FullMetadataOptions): Promise<
|
||||
packageJson.FullMetadata
|
||||
>;
|
||||
(packageName: string, options?: packageJson.Options): Promise<
|
||||
packageJson.AbbreviatedMetadata
|
||||
>;
|
||||
|
||||
/**
|
||||
The error thrown when the given package version cannot be found.
|
||||
*/
|
||||
VersionNotFoundError: typeof VersionNotFoundErrorClass;
|
||||
|
||||
/**
|
||||
The error thrown when the given package name cannot be found.
|
||||
*/
|
||||
PackageNotFoundError: typeof PackageNotFoundErrorClass;
|
||||
|
||||
// TODO: remove this in the next major version
|
||||
default: typeof packageJson;
|
||||
};
|
||||
|
||||
export = packageJson;
|
||||
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _v = _interopRequireDefault(require("./v35.js"));
|
||||
|
||||
var _md = _interopRequireDefault(require("./md5.js"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
const v3 = (0, _v.default)('v3', 0x30, _md.default);
|
||||
var _default = v3;
|
||||
exports.default = _default;
|
||||
@@ -0,0 +1,45 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { iterator as Symbol_iterator } from '../symbol/iterator';
|
||||
export function scheduleIterable(input, scheduler) {
|
||||
if (!input) {
|
||||
throw new Error('Iterable cannot be null');
|
||||
}
|
||||
return new Observable(subscriber => {
|
||||
const sub = new Subscription();
|
||||
let iterator;
|
||||
sub.add(() => {
|
||||
if (iterator && typeof iterator.return === 'function') {
|
||||
iterator.return();
|
||||
}
|
||||
});
|
||||
sub.add(scheduler.schedule(() => {
|
||||
iterator = input[Symbol_iterator]();
|
||||
sub.add(scheduler.schedule(function () {
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
let value;
|
||||
let done;
|
||||
try {
|
||||
const result = iterator.next();
|
||||
value = result.value;
|
||||
done = result.done;
|
||||
}
|
||||
catch (err) {
|
||||
subscriber.error(err);
|
||||
return;
|
||||
}
|
||||
if (done) {
|
||||
subscriber.complete();
|
||||
}
|
||||
else {
|
||||
subscriber.next(value);
|
||||
this.schedule();
|
||||
}
|
||||
}));
|
||||
}));
|
||||
return sub;
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=scheduleIterable.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/operators/merge"));
|
||||
//# sourceMappingURL=merge.js.map
|
||||
@@ -0,0 +1,142 @@
|
||||
/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { SubjectSubscriber } from '../Subject';
|
||||
import { Observable } from '../Observable';
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { Subscription } from '../Subscription';
|
||||
import { refCount as higherOrderRefCount } from '../operators/refCount';
|
||||
var ConnectableObservable = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(ConnectableObservable, _super);
|
||||
function ConnectableObservable(source, subjectFactory) {
|
||||
var _this = _super.call(this) || this;
|
||||
_this.source = source;
|
||||
_this.subjectFactory = subjectFactory;
|
||||
_this._refCount = 0;
|
||||
_this._isComplete = false;
|
||||
return _this;
|
||||
}
|
||||
ConnectableObservable.prototype._subscribe = function (subscriber) {
|
||||
return this.getSubject().subscribe(subscriber);
|
||||
};
|
||||
ConnectableObservable.prototype.getSubject = function () {
|
||||
var subject = this._subject;
|
||||
if (!subject || subject.isStopped) {
|
||||
this._subject = this.subjectFactory();
|
||||
}
|
||||
return this._subject;
|
||||
};
|
||||
ConnectableObservable.prototype.connect = function () {
|
||||
var connection = this._connection;
|
||||
if (!connection) {
|
||||
this._isComplete = false;
|
||||
connection = this._connection = new Subscription();
|
||||
connection.add(this.source
|
||||
.subscribe(new ConnectableSubscriber(this.getSubject(), this)));
|
||||
if (connection.closed) {
|
||||
this._connection = null;
|
||||
connection = Subscription.EMPTY;
|
||||
}
|
||||
}
|
||||
return connection;
|
||||
};
|
||||
ConnectableObservable.prototype.refCount = function () {
|
||||
return higherOrderRefCount()(this);
|
||||
};
|
||||
return ConnectableObservable;
|
||||
}(Observable));
|
||||
export { ConnectableObservable };
|
||||
export var connectableObservableDescriptor = /*@__PURE__*/ (function () {
|
||||
var connectableProto = ConnectableObservable.prototype;
|
||||
return {
|
||||
operator: { value: null },
|
||||
_refCount: { value: 0, writable: true },
|
||||
_subject: { value: null, writable: true },
|
||||
_connection: { value: null, writable: true },
|
||||
_subscribe: { value: connectableProto._subscribe },
|
||||
_isComplete: { value: connectableProto._isComplete, writable: true },
|
||||
getSubject: { value: connectableProto.getSubject },
|
||||
connect: { value: connectableProto.connect },
|
||||
refCount: { value: connectableProto.refCount }
|
||||
};
|
||||
})();
|
||||
var ConnectableSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(ConnectableSubscriber, _super);
|
||||
function ConnectableSubscriber(destination, connectable) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.connectable = connectable;
|
||||
return _this;
|
||||
}
|
||||
ConnectableSubscriber.prototype._error = function (err) {
|
||||
this._unsubscribe();
|
||||
_super.prototype._error.call(this, err);
|
||||
};
|
||||
ConnectableSubscriber.prototype._complete = function () {
|
||||
this.connectable._isComplete = true;
|
||||
this._unsubscribe();
|
||||
_super.prototype._complete.call(this);
|
||||
};
|
||||
ConnectableSubscriber.prototype._unsubscribe = function () {
|
||||
var connectable = this.connectable;
|
||||
if (connectable) {
|
||||
this.connectable = null;
|
||||
var connection = connectable._connection;
|
||||
connectable._refCount = 0;
|
||||
connectable._subject = null;
|
||||
connectable._connection = null;
|
||||
if (connection) {
|
||||
connection.unsubscribe();
|
||||
}
|
||||
}
|
||||
};
|
||||
return ConnectableSubscriber;
|
||||
}(SubjectSubscriber));
|
||||
var RefCountOperator = /*@__PURE__*/ (function () {
|
||||
function RefCountOperator(connectable) {
|
||||
this.connectable = connectable;
|
||||
}
|
||||
RefCountOperator.prototype.call = function (subscriber, source) {
|
||||
var connectable = this.connectable;
|
||||
connectable._refCount++;
|
||||
var refCounter = new RefCountSubscriber(subscriber, connectable);
|
||||
var subscription = source.subscribe(refCounter);
|
||||
if (!refCounter.closed) {
|
||||
refCounter.connection = connectable.connect();
|
||||
}
|
||||
return subscription;
|
||||
};
|
||||
return RefCountOperator;
|
||||
}());
|
||||
var RefCountSubscriber = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(RefCountSubscriber, _super);
|
||||
function RefCountSubscriber(destination, connectable) {
|
||||
var _this = _super.call(this, destination) || this;
|
||||
_this.connectable = connectable;
|
||||
return _this;
|
||||
}
|
||||
RefCountSubscriber.prototype._unsubscribe = function () {
|
||||
var connectable = this.connectable;
|
||||
if (!connectable) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
this.connectable = null;
|
||||
var refCount = connectable._refCount;
|
||||
if (refCount <= 0) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
connectable._refCount = refCount - 1;
|
||||
if (refCount > 1) {
|
||||
this.connection = null;
|
||||
return;
|
||||
}
|
||||
var connection = this.connection;
|
||||
var sharedConnection = connectable._connection;
|
||||
this.connection = null;
|
||||
if (sharedConnection && (!connection || sharedConnection === connection)) {
|
||||
sharedConnection.unsubscribe();
|
||||
}
|
||||
};
|
||||
return RefCountSubscriber;
|
||||
}(Subscriber));
|
||||
//# sourceMappingURL=ConnectableObservable.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skipWhile.js","sources":["../../../src/internal/operators/skipWhile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAe3C,MAAM,UAAU,SAAS,CAAI,SAA+C;IAC1E,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,SAAS,CAAC,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,iBAAiB;IACrB,YAAoB,SAA+C;QAA/C,cAAS,GAAT,SAAS,CAAsC;IACnE,CAAC;IAED,IAAI,CAAC,UAAyB,EAAE,MAAW;QACzC,OAAO,MAAM,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/E,CAAC;CACF;AAOD,MAAM,mBAAuB,SAAQ,UAAa;IAIhD,YAAY,WAA0B,EAClB,SAA+C;QACjE,KAAK,CAAC,WAAW,CAAC,CAAC;QADD,cAAS,GAAT,SAAS,CAAsC;QAJ3D,aAAQ,GAAY,IAAI,CAAC;QACzB,UAAK,GAAW,CAAC,CAAC;IAK1B,CAAC;IAES,KAAK,CAAC,KAAQ;QACtB,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QACrC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;SAC9B;QAED,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YAClB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACzB;IACH,CAAC;IAEO,gBAAgB,CAAC,KAAQ;QAC/B,IAAI;YACF,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YACnD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;SACjC;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SAC7B;IACH,CAAC;CACF"}
|
||||
@@ -0,0 +1,21 @@
|
||||
var inherits = require('util').inherits
|
||||
, Readable = require('stream').Readable
|
||||
, ReadableAsyncKit = require('./lib/readable_asynckit.js')
|
||||
, ReadableParallel = require('./lib/readable_parallel.js')
|
||||
, ReadableSerial = require('./lib/readable_serial.js')
|
||||
, ReadableSerialOrdered = require('./lib/readable_serial_ordered.js')
|
||||
;
|
||||
|
||||
// API
|
||||
module.exports =
|
||||
{
|
||||
parallel : ReadableParallel,
|
||||
serial : ReadableSerial,
|
||||
serialOrdered : ReadableSerialOrdered,
|
||||
};
|
||||
|
||||
inherits(ReadableAsyncKit, Readable);
|
||||
|
||||
inherits(ReadableParallel, ReadableAsyncKit);
|
||||
inherits(ReadableSerial, ReadableAsyncKit);
|
||||
inherits(ReadableSerialOrdered, ReadableAsyncKit);
|
||||
@@ -0,0 +1,9 @@
|
||||
import IntlMessageFormat from 'intl-messageformat';
|
||||
import type { MemoizedIntlFormatter } from '../types';
|
||||
declare type MemoizedNumberFormatterFactory = MemoizedIntlFormatter<Intl.NumberFormat, Intl.NumberFormatOptions>;
|
||||
declare type MemoizedDateTimeFormatterFactory = MemoizedIntlFormatter<Intl.DateTimeFormat, Intl.DateTimeFormatOptions>;
|
||||
export declare const getNumberFormatter: MemoizedNumberFormatterFactory;
|
||||
export declare const getDateFormatter: MemoizedDateTimeFormatterFactory;
|
||||
export declare const getTimeFormatter: MemoizedDateTimeFormatterFactory;
|
||||
export declare const getMessageFormatter: (message: string, locale?: string) => IntlMessageFormat;
|
||||
export {};
|
||||
@@ -0,0 +1,5 @@
|
||||
export const rxSubscriber = (() => typeof Symbol === 'function'
|
||||
? Symbol('rxSubscriber')
|
||||
: '@@rxSubscriber_' + Math.random())();
|
||||
export const $$rxSubscriber = rxSubscriber;
|
||||
//# sourceMappingURL=rxSubscriber.js.map
|
||||
@@ -0,0 +1 @@
|
||||
import 'rxjs-compat/add/operator/last';
|
||||
@@ -0,0 +1,41 @@
|
||||
/** PURE_IMPORTS_START _Observable,_scheduler_async,_util_isNumeric,_util_isScheduler PURE_IMPORTS_END */
|
||||
import { Observable } from '../Observable';
|
||||
import { async } from '../scheduler/async';
|
||||
import { isNumeric } from '../util/isNumeric';
|
||||
import { isScheduler } from '../util/isScheduler';
|
||||
export function timer(dueTime, periodOrScheduler, scheduler) {
|
||||
if (dueTime === void 0) {
|
||||
dueTime = 0;
|
||||
}
|
||||
var period = -1;
|
||||
if (isNumeric(periodOrScheduler)) {
|
||||
period = Number(periodOrScheduler) < 1 && 1 || Number(periodOrScheduler);
|
||||
}
|
||||
else if (isScheduler(periodOrScheduler)) {
|
||||
scheduler = periodOrScheduler;
|
||||
}
|
||||
if (!isScheduler(scheduler)) {
|
||||
scheduler = async;
|
||||
}
|
||||
return new Observable(function (subscriber) {
|
||||
var due = isNumeric(dueTime)
|
||||
? dueTime
|
||||
: (+dueTime - scheduler.now());
|
||||
return scheduler.schedule(dispatch, due, {
|
||||
index: 0, period: period, subscriber: subscriber
|
||||
});
|
||||
});
|
||||
}
|
||||
function dispatch(state) {
|
||||
var index = state.index, period = state.period, subscriber = state.subscriber;
|
||||
subscriber.next(index);
|
||||
if (subscriber.closed) {
|
||||
return;
|
||||
}
|
||||
else if (period === -1) {
|
||||
return subscriber.complete();
|
||||
}
|
||||
state.index = index + 1;
|
||||
this.schedule(state, period);
|
||||
}
|
||||
//# sourceMappingURL=timer.js.map
|
||||
@@ -0,0 +1,53 @@
|
||||
import { reduce } from './reduce';
|
||||
import { MonoTypeOperatorFunction } from '../types';
|
||||
|
||||
/**
|
||||
* The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function),
|
||||
* and when source Observable completes it emits a single item: the item with the smallest value.
|
||||
*
|
||||
* 
|
||||
*
|
||||
* ## Examples
|
||||
* Get the minimal value of a series of numbers
|
||||
* ```ts
|
||||
* import { of } from 'rxjs';
|
||||
* import { min } from 'rxjs/operators';
|
||||
*
|
||||
* of(5, 4, 7, 2, 8).pipe(
|
||||
* min(),
|
||||
* )
|
||||
* .subscribe(x => console.log(x)); // -> 2
|
||||
* ```
|
||||
*
|
||||
* Use a comparer function to get the minimal item
|
||||
* ```typescript
|
||||
* import { of } from 'rxjs';
|
||||
* import { min } from 'rxjs/operators';
|
||||
*
|
||||
* interface Person {
|
||||
* age: number,
|
||||
* name: string
|
||||
* }
|
||||
* of<Person>(
|
||||
* {age: 7, name: 'Foo'},
|
||||
* {age: 5, name: 'Bar'},
|
||||
* {age: 9, name: 'Beer'},
|
||||
* ).pipe(
|
||||
* min<Person>( (a: Person, b: Person) => a.age < b.age ? -1 : 1),
|
||||
* )
|
||||
* .subscribe((x: Person) => console.log(x.name)); // -> 'Bar'
|
||||
* ```
|
||||
* @see {@link max}
|
||||
*
|
||||
* @param {Function} [comparer] - Optional comparer function that it will use instead of its default to compare the
|
||||
* value of two items.
|
||||
* @return {Observable<R>} An Observable that emits item with the smallest value.
|
||||
* @method min
|
||||
* @owner Observable
|
||||
*/
|
||||
export function min<T>(comparer?: (x: T, y: T) => number): MonoTypeOperatorFunction<T> {
|
||||
const min: (x: T, y: T) => T = (typeof comparer === 'function')
|
||||
? (x, y) => comparer(x, y) < 0 ? x : y
|
||||
: (x, y) => x < y ? x : y;
|
||||
return reduce(min);
|
||||
}
|
||||
@@ -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 H M N O"},C:{"1":"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 UB VB WB XB YB uB ZB vB aB bB cB dB DC EC","194":"eB"},D:{"1":"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 ZB vB aB"},E:{"1":"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 B GC zB HC IC JC KC 0B"},F:{"1":"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 NB OB PB OC PC QC RC qB 9B SC rB"},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 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:6,C:"JavaScript modules: dynamic import()"};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"G A B","2":"BC","8":"J E F"},B:{"1":"C K L 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"},C:{"1":"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 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 EC","132":"CC tB DC"},D:{"1":"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 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"},E:{"1":"I u J E F G A B C K L H HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","132":"GC zB"},F:{"1":"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 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 OC PC QC RC qB 9B SC rB"},G:{"1":"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:{"260":"nC"},I:{"1":"tB I D rC AC sC tC","132":"oC pC qC"},J:{"1":"E A"},K:{"1":"A B C e qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"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:"Canvas (basic support)"};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J E F G A B BC"},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:{"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 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 DC EC"},D:{"16":"I u J E F G A B C K L H M N O","33":"0 1 2 3 4 5 6 7 8 9 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 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"},E:{"1":"3B 4B 5B sB 6B 7B 8B NC","2":"I u GC zB HC","33":"J E F G A B C K L H IC JC KC 0B qB rB 1B LC MC 2B"},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"},G:{"1":"3B 4B 5B sB 6B 7B 8B","16":"F zB TC AC UC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B"},H:{"2":"nC"},I:{"16":"tB I oC pC qC rC AC sC tC","33":"D"},J:{"16":"E A"},K:{"2":"A B C qB 9B rB","33":"e"},L:{"16":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"16":"uC"},P:{"16":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"33":"1B"},R:{"16":"8C"},S:{"1":"9C"}},B:4,C:"CSS print-color-adjust"};
|
||||
@@ -0,0 +1,16 @@
|
||||
/** PURE_IMPORTS_START _scan,_takeLast,_defaultIfEmpty,_util_pipe PURE_IMPORTS_END */
|
||||
import { scan } from './scan';
|
||||
import { takeLast } from './takeLast';
|
||||
import { defaultIfEmpty } from './defaultIfEmpty';
|
||||
import { pipe } from '../util/pipe';
|
||||
export function reduce(accumulator, seed) {
|
||||
if (arguments.length >= 2) {
|
||||
return function reduceOperatorFunctionWithSeed(source) {
|
||||
return pipe(scan(accumulator, seed), takeLast(1), defaultIfEmpty(seed))(source);
|
||||
};
|
||||
}
|
||||
return function reduceOperatorFunction(source) {
|
||||
return pipe(scan(function (acc, value, index) { return accumulator(acc, value, index + 1); }), takeLast(1))(source);
|
||||
};
|
||||
}
|
||||
//# sourceMappingURL=reduce.js.map
|
||||
Reference in New Issue
Block a user