new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"name":"acorn","version":"7.4.1","files":{"bin/acorn":{"checkedAt":1678883672896,"integrity":"sha512-b3D+TNAiQiTQOjcyvNM1dbG/adc1uWXcjk24uXzP1QSLXdRLr77AJuVeVNR9n1E9HkLZPoJzZhIlmZbRnh2bRw==","mode":493,"size":62},"LICENSE":{"checkedAt":1678883672896,"integrity":"sha512-rNLBTaJmdMDY+WLdtWCyoEVy3etADm1saRrmu6GYPLzQ4r6/9q5tqZ1SikFgHkpQGHBGun1WWp7HYO7K4Hhhzg==","mode":420,"size":1099},"dist/acorn.js":{"checkedAt":1678883672898,"integrity":"sha512-lI4SczhLWml1F3WccuqFjnjjVdmgQFdFDnxZHGn8VnaVHUDX86jJi0DoW6bFTxvAgXRjcJ8tCeAIzEfpl/98UA==","mode":420,"size":200010},"dist/bin.js":{"checkedAt":1678883672898,"integrity":"sha512-N6QNRO8jyUwuElTRbzJZxbr3bSe2znUrLElsvy8gWXlZHD148v29OaO/zQrThf6+IV4czh34G9H8TT/dHCgoOw==","mode":420,"size":2291},"package.json":{"checkedAt":1678883672898,"integrity":"sha512-/Df+voIm7BSLBWBLItarJMGI2DNHM0B9ZW9zX3z4gF+No9eK/YWXyMKefX7K/HmZ6F4nZet3aype+8WSN3MdlQ==","mode":420,"size":832},"dist/acorn.js.map":{"checkedAt":1678883672900,"integrity":"sha512-PWVfPSwXOXHeNdsRrsSZgnbSNNsX9lnCwtW1IuDiEnZm2w052WDoN1tjeS3dBF/t6dAUZ/I0tMLvO1IPpEGZ8w==","mode":420,"size":392402},"dist/acorn.mjs.map":{"checkedAt":1678883672903,"integrity":"sha512-VEZRovm0tqzvZDx5IhctO8B3ul7Qj7jT5D67QsO45TTWDXmNpiKhbtu0PXXKyW1QrPyX2dD5j3V/p5WE41S4NA==","mode":420,"size":392368},"CHANGELOG.md":{"checkedAt":1678883672903,"integrity":"sha512-yt0aQTI02chM2l6dv0Fupc3zt9YzjDsm0exEl3y80fRPYbC2lbPc/KLhYKODSQ7bHMr/FdAEmhOtnhv4wI8ptQ==","mode":420,"size":14896},"README.md":{"checkedAt":1678883672903,"integrity":"sha512-V6c9y43rQZBw+HcQEWi+2oAmgoUeBNX/9VK9EQpdhCSSunB6JP9QjGzS85UiU74ySW8a1nd1C6GCoADsu+1MEw==","mode":420,"size":10399},"dist/acorn.mjs.d.ts":{"checkedAt":1678883672443,"integrity":"sha512-a6PFdmlibaHxVNNcWWk5jaZ2zIaBozhO0i07j1yBGJOrwNIreilJKW4lzAHWZ2QMu+J1lPWjq5Jy71gSv7zUBA==","mode":420,"size":49},"dist/acorn.mjs":{"checkedAt":1678883672907,"integrity":"sha512-kUTXKg58aWayD3ZXhHVdWkdGpEHTPkWQWcs1CRCv14lpdyu9zbFNKu4dCPWAASoUvqmfRaZcI3gSKajc3NUoCQ==","mode":420,"size":190128},"dist/acorn.d.ts":{"checkedAt":1678883672907,"integrity":"sha512-yMlDkqHkJBnZQrc7SPQnClHgqstJ3vM+B2/2LrjfWQxRZSu1zhDFnJ6IK+5v+KGwZ0Hzf5dDwglwDc1X4r3yvw==","mode":420,"size":5224}}}
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "os-name",
|
||||
"version": "5.1.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"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"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": "^3.1.0",
|
||||
"windows-release": "^5.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.7",
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.18.0",
|
||||
"xo": "^0.46.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
module.exports = Function.prototype.bind || implementation;
|
||||
@@ -0,0 +1,80 @@
|
||||
var common = require('./common');
|
||||
var fs = require('fs');
|
||||
|
||||
common.register('tail', _tail, {
|
||||
canReceivePipe: true,
|
||||
cmdOptions: {
|
||||
'n': 'numLines',
|
||||
},
|
||||
});
|
||||
|
||||
//@
|
||||
//@ ### tail([{'-n': \<num\>},] file [, file ...])
|
||||
//@ ### tail([{'-n': \<num\>},] file_array)
|
||||
//@
|
||||
//@ Available options:
|
||||
//@
|
||||
//@ + `-n <num>`: Show the last `<num>` lines of `file`s
|
||||
//@
|
||||
//@ Examples:
|
||||
//@
|
||||
//@ ```javascript
|
||||
//@ var str = tail({'-n': 1}, 'file*.txt');
|
||||
//@ var str = tail('file1', 'file2');
|
||||
//@ var str = tail(['file1', 'file2']); // same as above
|
||||
//@ ```
|
||||
//@
|
||||
//@ Read the end of a `file`.
|
||||
function _tail(options, files) {
|
||||
var tail = [];
|
||||
var pipe = common.readFromPipe();
|
||||
|
||||
if (!files && !pipe) common.error('no paths given');
|
||||
|
||||
var idx = 1;
|
||||
if (options.numLines === true) {
|
||||
idx = 2;
|
||||
options.numLines = Number(arguments[1]);
|
||||
} else if (options.numLines === false) {
|
||||
options.numLines = 10;
|
||||
}
|
||||
options.numLines = -1 * Math.abs(options.numLines);
|
||||
files = [].slice.call(arguments, idx);
|
||||
|
||||
if (pipe) {
|
||||
files.unshift('-');
|
||||
}
|
||||
|
||||
var shouldAppendNewline = false;
|
||||
files.forEach(function (file) {
|
||||
if (file !== '-') {
|
||||
if (!fs.existsSync(file)) {
|
||||
common.error('no such file or directory: ' + file, { continue: true });
|
||||
return;
|
||||
} else if (common.statFollowLinks(file).isDirectory()) {
|
||||
common.error("error reading '" + file + "': Is a directory", {
|
||||
continue: true,
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var contents = file === '-' ? pipe : fs.readFileSync(file, 'utf8');
|
||||
|
||||
var lines = contents.split('\n');
|
||||
if (lines[lines.length - 1] === '') {
|
||||
lines.pop();
|
||||
shouldAppendNewline = true;
|
||||
} else {
|
||||
shouldAppendNewline = false;
|
||||
}
|
||||
|
||||
tail = tail.concat(lines.slice(options.numLines));
|
||||
});
|
||||
|
||||
if (shouldAppendNewline) {
|
||||
tail.push(''); // to add a trailing newline once we join
|
||||
}
|
||||
return tail.join('\n');
|
||||
}
|
||||
module.exports = _tail;
|
||||
@@ -0,0 +1,12 @@
|
||||
import Renderer from '../Renderer';
|
||||
import Block from '../Block';
|
||||
import Tag from './shared/Tag';
|
||||
import Wrapper from './shared/Wrapper';
|
||||
import MustacheTag from '../../nodes/MustacheTag';
|
||||
import RawMustacheTag from '../../nodes/RawMustacheTag';
|
||||
import { Identifier } from 'estree';
|
||||
export default class MustacheTagWrapper extends Tag {
|
||||
var: Identifier;
|
||||
constructor(renderer: Renderer, block: Block, parent: Wrapper, node: MustacheTag | RawMustacheTag);
|
||||
render(block: Block, parent_node: Identifier, parent_nodes: Identifier): void;
|
||||
}
|
||||
@@ -0,0 +1,358 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.interval = exports.iif = exports.generate = exports.fromEventPattern = exports.fromEvent = exports.from = exports.forkJoin = exports.empty = exports.defer = exports.connectable = exports.concat = exports.combineLatest = exports.bindNodeCallback = exports.bindCallback = exports.UnsubscriptionError = exports.TimeoutError = exports.SequenceError = exports.ObjectUnsubscribedError = exports.NotFoundError = exports.EmptyError = exports.ArgumentOutOfRangeError = exports.firstValueFrom = exports.lastValueFrom = exports.isObservable = exports.identity = exports.noop = exports.pipe = exports.NotificationKind = exports.Notification = exports.Subscriber = exports.Subscription = exports.Scheduler = exports.VirtualAction = exports.VirtualTimeScheduler = exports.animationFrameScheduler = exports.animationFrame = exports.queueScheduler = exports.queue = exports.asyncScheduler = exports.async = exports.asapScheduler = exports.asap = exports.AsyncSubject = exports.ReplaySubject = exports.BehaviorSubject = exports.Subject = exports.animationFrames = exports.observable = exports.ConnectableObservable = exports.Observable = void 0;
|
||||
exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.exhaust = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.combineLatestWith = exports.combineLatestAll = exports.combineAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = exports.config = exports.NEVER = exports.EMPTY = exports.scheduled = exports.zip = exports.using = exports.timer = exports.throwError = exports.range = exports.race = exports.partition = exports.pairs = exports.onErrorResumeNext = exports.of = exports.never = exports.merge = void 0;
|
||||
exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.refCount = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.publishReplay = exports.publishLast = exports.publishBehavior = exports.publish = exports.pluck = exports.pairwise = exports.onErrorResumeNextWith = exports.observeOn = exports.multicast = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.flatMap = exports.mergeAll = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = void 0;
|
||||
exports.zipWith = exports.zipAll = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = void 0;
|
||||
var Observable_1 = require("./internal/Observable");
|
||||
Object.defineProperty(exports, "Observable", { enumerable: true, get: function () { return Observable_1.Observable; } });
|
||||
var ConnectableObservable_1 = require("./internal/observable/ConnectableObservable");
|
||||
Object.defineProperty(exports, "ConnectableObservable", { enumerable: true, get: function () { return ConnectableObservable_1.ConnectableObservable; } });
|
||||
var observable_1 = require("./internal/symbol/observable");
|
||||
Object.defineProperty(exports, "observable", { enumerable: true, get: function () { return observable_1.observable; } });
|
||||
var animationFrames_1 = require("./internal/observable/dom/animationFrames");
|
||||
Object.defineProperty(exports, "animationFrames", { enumerable: true, get: function () { return animationFrames_1.animationFrames; } });
|
||||
var Subject_1 = require("./internal/Subject");
|
||||
Object.defineProperty(exports, "Subject", { enumerable: true, get: function () { return Subject_1.Subject; } });
|
||||
var BehaviorSubject_1 = require("./internal/BehaviorSubject");
|
||||
Object.defineProperty(exports, "BehaviorSubject", { enumerable: true, get: function () { return BehaviorSubject_1.BehaviorSubject; } });
|
||||
var ReplaySubject_1 = require("./internal/ReplaySubject");
|
||||
Object.defineProperty(exports, "ReplaySubject", { enumerable: true, get: function () { return ReplaySubject_1.ReplaySubject; } });
|
||||
var AsyncSubject_1 = require("./internal/AsyncSubject");
|
||||
Object.defineProperty(exports, "AsyncSubject", { enumerable: true, get: function () { return AsyncSubject_1.AsyncSubject; } });
|
||||
var asap_1 = require("./internal/scheduler/asap");
|
||||
Object.defineProperty(exports, "asap", { enumerable: true, get: function () { return asap_1.asap; } });
|
||||
Object.defineProperty(exports, "asapScheduler", { enumerable: true, get: function () { return asap_1.asapScheduler; } });
|
||||
var async_1 = require("./internal/scheduler/async");
|
||||
Object.defineProperty(exports, "async", { enumerable: true, get: function () { return async_1.async; } });
|
||||
Object.defineProperty(exports, "asyncScheduler", { enumerable: true, get: function () { return async_1.asyncScheduler; } });
|
||||
var queue_1 = require("./internal/scheduler/queue");
|
||||
Object.defineProperty(exports, "queue", { enumerable: true, get: function () { return queue_1.queue; } });
|
||||
Object.defineProperty(exports, "queueScheduler", { enumerable: true, get: function () { return queue_1.queueScheduler; } });
|
||||
var animationFrame_1 = require("./internal/scheduler/animationFrame");
|
||||
Object.defineProperty(exports, "animationFrame", { enumerable: true, get: function () { return animationFrame_1.animationFrame; } });
|
||||
Object.defineProperty(exports, "animationFrameScheduler", { enumerable: true, get: function () { return animationFrame_1.animationFrameScheduler; } });
|
||||
var VirtualTimeScheduler_1 = require("./internal/scheduler/VirtualTimeScheduler");
|
||||
Object.defineProperty(exports, "VirtualTimeScheduler", { enumerable: true, get: function () { return VirtualTimeScheduler_1.VirtualTimeScheduler; } });
|
||||
Object.defineProperty(exports, "VirtualAction", { enumerable: true, get: function () { return VirtualTimeScheduler_1.VirtualAction; } });
|
||||
var Scheduler_1 = require("./internal/Scheduler");
|
||||
Object.defineProperty(exports, "Scheduler", { enumerable: true, get: function () { return Scheduler_1.Scheduler; } });
|
||||
var Subscription_1 = require("./internal/Subscription");
|
||||
Object.defineProperty(exports, "Subscription", { enumerable: true, get: function () { return Subscription_1.Subscription; } });
|
||||
var Subscriber_1 = require("./internal/Subscriber");
|
||||
Object.defineProperty(exports, "Subscriber", { enumerable: true, get: function () { return Subscriber_1.Subscriber; } });
|
||||
var Notification_1 = require("./internal/Notification");
|
||||
Object.defineProperty(exports, "Notification", { enumerable: true, get: function () { return Notification_1.Notification; } });
|
||||
Object.defineProperty(exports, "NotificationKind", { enumerable: true, get: function () { return Notification_1.NotificationKind; } });
|
||||
var pipe_1 = require("./internal/util/pipe");
|
||||
Object.defineProperty(exports, "pipe", { enumerable: true, get: function () { return pipe_1.pipe; } });
|
||||
var noop_1 = require("./internal/util/noop");
|
||||
Object.defineProperty(exports, "noop", { enumerable: true, get: function () { return noop_1.noop; } });
|
||||
var identity_1 = require("./internal/util/identity");
|
||||
Object.defineProperty(exports, "identity", { enumerable: true, get: function () { return identity_1.identity; } });
|
||||
var isObservable_1 = require("./internal/util/isObservable");
|
||||
Object.defineProperty(exports, "isObservable", { enumerable: true, get: function () { return isObservable_1.isObservable; } });
|
||||
var lastValueFrom_1 = require("./internal/lastValueFrom");
|
||||
Object.defineProperty(exports, "lastValueFrom", { enumerable: true, get: function () { return lastValueFrom_1.lastValueFrom; } });
|
||||
var firstValueFrom_1 = require("./internal/firstValueFrom");
|
||||
Object.defineProperty(exports, "firstValueFrom", { enumerable: true, get: function () { return firstValueFrom_1.firstValueFrom; } });
|
||||
var ArgumentOutOfRangeError_1 = require("./internal/util/ArgumentOutOfRangeError");
|
||||
Object.defineProperty(exports, "ArgumentOutOfRangeError", { enumerable: true, get: function () { return ArgumentOutOfRangeError_1.ArgumentOutOfRangeError; } });
|
||||
var EmptyError_1 = require("./internal/util/EmptyError");
|
||||
Object.defineProperty(exports, "EmptyError", { enumerable: true, get: function () { return EmptyError_1.EmptyError; } });
|
||||
var NotFoundError_1 = require("./internal/util/NotFoundError");
|
||||
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return NotFoundError_1.NotFoundError; } });
|
||||
var ObjectUnsubscribedError_1 = require("./internal/util/ObjectUnsubscribedError");
|
||||
Object.defineProperty(exports, "ObjectUnsubscribedError", { enumerable: true, get: function () { return ObjectUnsubscribedError_1.ObjectUnsubscribedError; } });
|
||||
var SequenceError_1 = require("./internal/util/SequenceError");
|
||||
Object.defineProperty(exports, "SequenceError", { enumerable: true, get: function () { return SequenceError_1.SequenceError; } });
|
||||
var timeout_1 = require("./internal/operators/timeout");
|
||||
Object.defineProperty(exports, "TimeoutError", { enumerable: true, get: function () { return timeout_1.TimeoutError; } });
|
||||
var UnsubscriptionError_1 = require("./internal/util/UnsubscriptionError");
|
||||
Object.defineProperty(exports, "UnsubscriptionError", { enumerable: true, get: function () { return UnsubscriptionError_1.UnsubscriptionError; } });
|
||||
var bindCallback_1 = require("./internal/observable/bindCallback");
|
||||
Object.defineProperty(exports, "bindCallback", { enumerable: true, get: function () { return bindCallback_1.bindCallback; } });
|
||||
var bindNodeCallback_1 = require("./internal/observable/bindNodeCallback");
|
||||
Object.defineProperty(exports, "bindNodeCallback", { enumerable: true, get: function () { return bindNodeCallback_1.bindNodeCallback; } });
|
||||
var combineLatest_1 = require("./internal/observable/combineLatest");
|
||||
Object.defineProperty(exports, "combineLatest", { enumerable: true, get: function () { return combineLatest_1.combineLatest; } });
|
||||
var concat_1 = require("./internal/observable/concat");
|
||||
Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return concat_1.concat; } });
|
||||
var connectable_1 = require("./internal/observable/connectable");
|
||||
Object.defineProperty(exports, "connectable", { enumerable: true, get: function () { return connectable_1.connectable; } });
|
||||
var defer_1 = require("./internal/observable/defer");
|
||||
Object.defineProperty(exports, "defer", { enumerable: true, get: function () { return defer_1.defer; } });
|
||||
var empty_1 = require("./internal/observable/empty");
|
||||
Object.defineProperty(exports, "empty", { enumerable: true, get: function () { return empty_1.empty; } });
|
||||
var forkJoin_1 = require("./internal/observable/forkJoin");
|
||||
Object.defineProperty(exports, "forkJoin", { enumerable: true, get: function () { return forkJoin_1.forkJoin; } });
|
||||
var from_1 = require("./internal/observable/from");
|
||||
Object.defineProperty(exports, "from", { enumerable: true, get: function () { return from_1.from; } });
|
||||
var fromEvent_1 = require("./internal/observable/fromEvent");
|
||||
Object.defineProperty(exports, "fromEvent", { enumerable: true, get: function () { return fromEvent_1.fromEvent; } });
|
||||
var fromEventPattern_1 = require("./internal/observable/fromEventPattern");
|
||||
Object.defineProperty(exports, "fromEventPattern", { enumerable: true, get: function () { return fromEventPattern_1.fromEventPattern; } });
|
||||
var generate_1 = require("./internal/observable/generate");
|
||||
Object.defineProperty(exports, "generate", { enumerable: true, get: function () { return generate_1.generate; } });
|
||||
var iif_1 = require("./internal/observable/iif");
|
||||
Object.defineProperty(exports, "iif", { enumerable: true, get: function () { return iif_1.iif; } });
|
||||
var interval_1 = require("./internal/observable/interval");
|
||||
Object.defineProperty(exports, "interval", { enumerable: true, get: function () { return interval_1.interval; } });
|
||||
var merge_1 = require("./internal/observable/merge");
|
||||
Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return merge_1.merge; } });
|
||||
var never_1 = require("./internal/observable/never");
|
||||
Object.defineProperty(exports, "never", { enumerable: true, get: function () { return never_1.never; } });
|
||||
var of_1 = require("./internal/observable/of");
|
||||
Object.defineProperty(exports, "of", { enumerable: true, get: function () { return of_1.of; } });
|
||||
var onErrorResumeNext_1 = require("./internal/observable/onErrorResumeNext");
|
||||
Object.defineProperty(exports, "onErrorResumeNext", { enumerable: true, get: function () { return onErrorResumeNext_1.onErrorResumeNext; } });
|
||||
var pairs_1 = require("./internal/observable/pairs");
|
||||
Object.defineProperty(exports, "pairs", { enumerable: true, get: function () { return pairs_1.pairs; } });
|
||||
var partition_1 = require("./internal/observable/partition");
|
||||
Object.defineProperty(exports, "partition", { enumerable: true, get: function () { return partition_1.partition; } });
|
||||
var race_1 = require("./internal/observable/race");
|
||||
Object.defineProperty(exports, "race", { enumerable: true, get: function () { return race_1.race; } });
|
||||
var range_1 = require("./internal/observable/range");
|
||||
Object.defineProperty(exports, "range", { enumerable: true, get: function () { return range_1.range; } });
|
||||
var throwError_1 = require("./internal/observable/throwError");
|
||||
Object.defineProperty(exports, "throwError", { enumerable: true, get: function () { return throwError_1.throwError; } });
|
||||
var timer_1 = require("./internal/observable/timer");
|
||||
Object.defineProperty(exports, "timer", { enumerable: true, get: function () { return timer_1.timer; } });
|
||||
var using_1 = require("./internal/observable/using");
|
||||
Object.defineProperty(exports, "using", { enumerable: true, get: function () { return using_1.using; } });
|
||||
var zip_1 = require("./internal/observable/zip");
|
||||
Object.defineProperty(exports, "zip", { enumerable: true, get: function () { return zip_1.zip; } });
|
||||
var scheduled_1 = require("./internal/scheduled/scheduled");
|
||||
Object.defineProperty(exports, "scheduled", { enumerable: true, get: function () { return scheduled_1.scheduled; } });
|
||||
var empty_2 = require("./internal/observable/empty");
|
||||
Object.defineProperty(exports, "EMPTY", { enumerable: true, get: function () { return empty_2.EMPTY; } });
|
||||
var never_2 = require("./internal/observable/never");
|
||||
Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return never_2.NEVER; } });
|
||||
__exportStar(require("./internal/types"), exports);
|
||||
var config_1 = require("./internal/config");
|
||||
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return config_1.config; } });
|
||||
var audit_1 = require("./internal/operators/audit");
|
||||
Object.defineProperty(exports, "audit", { enumerable: true, get: function () { return audit_1.audit; } });
|
||||
var auditTime_1 = require("./internal/operators/auditTime");
|
||||
Object.defineProperty(exports, "auditTime", { enumerable: true, get: function () { return auditTime_1.auditTime; } });
|
||||
var buffer_1 = require("./internal/operators/buffer");
|
||||
Object.defineProperty(exports, "buffer", { enumerable: true, get: function () { return buffer_1.buffer; } });
|
||||
var bufferCount_1 = require("./internal/operators/bufferCount");
|
||||
Object.defineProperty(exports, "bufferCount", { enumerable: true, get: function () { return bufferCount_1.bufferCount; } });
|
||||
var bufferTime_1 = require("./internal/operators/bufferTime");
|
||||
Object.defineProperty(exports, "bufferTime", { enumerable: true, get: function () { return bufferTime_1.bufferTime; } });
|
||||
var bufferToggle_1 = require("./internal/operators/bufferToggle");
|
||||
Object.defineProperty(exports, "bufferToggle", { enumerable: true, get: function () { return bufferToggle_1.bufferToggle; } });
|
||||
var bufferWhen_1 = require("./internal/operators/bufferWhen");
|
||||
Object.defineProperty(exports, "bufferWhen", { enumerable: true, get: function () { return bufferWhen_1.bufferWhen; } });
|
||||
var catchError_1 = require("./internal/operators/catchError");
|
||||
Object.defineProperty(exports, "catchError", { enumerable: true, get: function () { return catchError_1.catchError; } });
|
||||
var combineAll_1 = require("./internal/operators/combineAll");
|
||||
Object.defineProperty(exports, "combineAll", { enumerable: true, get: function () { return combineAll_1.combineAll; } });
|
||||
var combineLatestAll_1 = require("./internal/operators/combineLatestAll");
|
||||
Object.defineProperty(exports, "combineLatestAll", { enumerable: true, get: function () { return combineLatestAll_1.combineLatestAll; } });
|
||||
var combineLatestWith_1 = require("./internal/operators/combineLatestWith");
|
||||
Object.defineProperty(exports, "combineLatestWith", { enumerable: true, get: function () { return combineLatestWith_1.combineLatestWith; } });
|
||||
var concatAll_1 = require("./internal/operators/concatAll");
|
||||
Object.defineProperty(exports, "concatAll", { enumerable: true, get: function () { return concatAll_1.concatAll; } });
|
||||
var concatMap_1 = require("./internal/operators/concatMap");
|
||||
Object.defineProperty(exports, "concatMap", { enumerable: true, get: function () { return concatMap_1.concatMap; } });
|
||||
var concatMapTo_1 = require("./internal/operators/concatMapTo");
|
||||
Object.defineProperty(exports, "concatMapTo", { enumerable: true, get: function () { return concatMapTo_1.concatMapTo; } });
|
||||
var concatWith_1 = require("./internal/operators/concatWith");
|
||||
Object.defineProperty(exports, "concatWith", { enumerable: true, get: function () { return concatWith_1.concatWith; } });
|
||||
var connect_1 = require("./internal/operators/connect");
|
||||
Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return connect_1.connect; } });
|
||||
var count_1 = require("./internal/operators/count");
|
||||
Object.defineProperty(exports, "count", { enumerable: true, get: function () { return count_1.count; } });
|
||||
var debounce_1 = require("./internal/operators/debounce");
|
||||
Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return debounce_1.debounce; } });
|
||||
var debounceTime_1 = require("./internal/operators/debounceTime");
|
||||
Object.defineProperty(exports, "debounceTime", { enumerable: true, get: function () { return debounceTime_1.debounceTime; } });
|
||||
var defaultIfEmpty_1 = require("./internal/operators/defaultIfEmpty");
|
||||
Object.defineProperty(exports, "defaultIfEmpty", { enumerable: true, get: function () { return defaultIfEmpty_1.defaultIfEmpty; } });
|
||||
var delay_1 = require("./internal/operators/delay");
|
||||
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return delay_1.delay; } });
|
||||
var delayWhen_1 = require("./internal/operators/delayWhen");
|
||||
Object.defineProperty(exports, "delayWhen", { enumerable: true, get: function () { return delayWhen_1.delayWhen; } });
|
||||
var dematerialize_1 = require("./internal/operators/dematerialize");
|
||||
Object.defineProperty(exports, "dematerialize", { enumerable: true, get: function () { return dematerialize_1.dematerialize; } });
|
||||
var distinct_1 = require("./internal/operators/distinct");
|
||||
Object.defineProperty(exports, "distinct", { enumerable: true, get: function () { return distinct_1.distinct; } });
|
||||
var distinctUntilChanged_1 = require("./internal/operators/distinctUntilChanged");
|
||||
Object.defineProperty(exports, "distinctUntilChanged", { enumerable: true, get: function () { return distinctUntilChanged_1.distinctUntilChanged; } });
|
||||
var distinctUntilKeyChanged_1 = require("./internal/operators/distinctUntilKeyChanged");
|
||||
Object.defineProperty(exports, "distinctUntilKeyChanged", { enumerable: true, get: function () { return distinctUntilKeyChanged_1.distinctUntilKeyChanged; } });
|
||||
var elementAt_1 = require("./internal/operators/elementAt");
|
||||
Object.defineProperty(exports, "elementAt", { enumerable: true, get: function () { return elementAt_1.elementAt; } });
|
||||
var endWith_1 = require("./internal/operators/endWith");
|
||||
Object.defineProperty(exports, "endWith", { enumerable: true, get: function () { return endWith_1.endWith; } });
|
||||
var every_1 = require("./internal/operators/every");
|
||||
Object.defineProperty(exports, "every", { enumerable: true, get: function () { return every_1.every; } });
|
||||
var exhaust_1 = require("./internal/operators/exhaust");
|
||||
Object.defineProperty(exports, "exhaust", { enumerable: true, get: function () { return exhaust_1.exhaust; } });
|
||||
var exhaustAll_1 = require("./internal/operators/exhaustAll");
|
||||
Object.defineProperty(exports, "exhaustAll", { enumerable: true, get: function () { return exhaustAll_1.exhaustAll; } });
|
||||
var exhaustMap_1 = require("./internal/operators/exhaustMap");
|
||||
Object.defineProperty(exports, "exhaustMap", { enumerable: true, get: function () { return exhaustMap_1.exhaustMap; } });
|
||||
var expand_1 = require("./internal/operators/expand");
|
||||
Object.defineProperty(exports, "expand", { enumerable: true, get: function () { return expand_1.expand; } });
|
||||
var filter_1 = require("./internal/operators/filter");
|
||||
Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return filter_1.filter; } });
|
||||
var finalize_1 = require("./internal/operators/finalize");
|
||||
Object.defineProperty(exports, "finalize", { enumerable: true, get: function () { return finalize_1.finalize; } });
|
||||
var find_1 = require("./internal/operators/find");
|
||||
Object.defineProperty(exports, "find", { enumerable: true, get: function () { return find_1.find; } });
|
||||
var findIndex_1 = require("./internal/operators/findIndex");
|
||||
Object.defineProperty(exports, "findIndex", { enumerable: true, get: function () { return findIndex_1.findIndex; } });
|
||||
var first_1 = require("./internal/operators/first");
|
||||
Object.defineProperty(exports, "first", { enumerable: true, get: function () { return first_1.first; } });
|
||||
var groupBy_1 = require("./internal/operators/groupBy");
|
||||
Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } });
|
||||
var ignoreElements_1 = require("./internal/operators/ignoreElements");
|
||||
Object.defineProperty(exports, "ignoreElements", { enumerable: true, get: function () { return ignoreElements_1.ignoreElements; } });
|
||||
var isEmpty_1 = require("./internal/operators/isEmpty");
|
||||
Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return isEmpty_1.isEmpty; } });
|
||||
var last_1 = require("./internal/operators/last");
|
||||
Object.defineProperty(exports, "last", { enumerable: true, get: function () { return last_1.last; } });
|
||||
var map_1 = require("./internal/operators/map");
|
||||
Object.defineProperty(exports, "map", { enumerable: true, get: function () { return map_1.map; } });
|
||||
var mapTo_1 = require("./internal/operators/mapTo");
|
||||
Object.defineProperty(exports, "mapTo", { enumerable: true, get: function () { return mapTo_1.mapTo; } });
|
||||
var materialize_1 = require("./internal/operators/materialize");
|
||||
Object.defineProperty(exports, "materialize", { enumerable: true, get: function () { return materialize_1.materialize; } });
|
||||
var max_1 = require("./internal/operators/max");
|
||||
Object.defineProperty(exports, "max", { enumerable: true, get: function () { return max_1.max; } });
|
||||
var mergeAll_1 = require("./internal/operators/mergeAll");
|
||||
Object.defineProperty(exports, "mergeAll", { enumerable: true, get: function () { return mergeAll_1.mergeAll; } });
|
||||
var flatMap_1 = require("./internal/operators/flatMap");
|
||||
Object.defineProperty(exports, "flatMap", { enumerable: true, get: function () { return flatMap_1.flatMap; } });
|
||||
var mergeMap_1 = require("./internal/operators/mergeMap");
|
||||
Object.defineProperty(exports, "mergeMap", { enumerable: true, get: function () { return mergeMap_1.mergeMap; } });
|
||||
var mergeMapTo_1 = require("./internal/operators/mergeMapTo");
|
||||
Object.defineProperty(exports, "mergeMapTo", { enumerable: true, get: function () { return mergeMapTo_1.mergeMapTo; } });
|
||||
var mergeScan_1 = require("./internal/operators/mergeScan");
|
||||
Object.defineProperty(exports, "mergeScan", { enumerable: true, get: function () { return mergeScan_1.mergeScan; } });
|
||||
var mergeWith_1 = require("./internal/operators/mergeWith");
|
||||
Object.defineProperty(exports, "mergeWith", { enumerable: true, get: function () { return mergeWith_1.mergeWith; } });
|
||||
var min_1 = require("./internal/operators/min");
|
||||
Object.defineProperty(exports, "min", { enumerable: true, get: function () { return min_1.min; } });
|
||||
var multicast_1 = require("./internal/operators/multicast");
|
||||
Object.defineProperty(exports, "multicast", { enumerable: true, get: function () { return multicast_1.multicast; } });
|
||||
var observeOn_1 = require("./internal/operators/observeOn");
|
||||
Object.defineProperty(exports, "observeOn", { enumerable: true, get: function () { return observeOn_1.observeOn; } });
|
||||
var onErrorResumeNextWith_1 = require("./internal/operators/onErrorResumeNextWith");
|
||||
Object.defineProperty(exports, "onErrorResumeNextWith", { enumerable: true, get: function () { return onErrorResumeNextWith_1.onErrorResumeNextWith; } });
|
||||
var pairwise_1 = require("./internal/operators/pairwise");
|
||||
Object.defineProperty(exports, "pairwise", { enumerable: true, get: function () { return pairwise_1.pairwise; } });
|
||||
var pluck_1 = require("./internal/operators/pluck");
|
||||
Object.defineProperty(exports, "pluck", { enumerable: true, get: function () { return pluck_1.pluck; } });
|
||||
var publish_1 = require("./internal/operators/publish");
|
||||
Object.defineProperty(exports, "publish", { enumerable: true, get: function () { return publish_1.publish; } });
|
||||
var publishBehavior_1 = require("./internal/operators/publishBehavior");
|
||||
Object.defineProperty(exports, "publishBehavior", { enumerable: true, get: function () { return publishBehavior_1.publishBehavior; } });
|
||||
var publishLast_1 = require("./internal/operators/publishLast");
|
||||
Object.defineProperty(exports, "publishLast", { enumerable: true, get: function () { return publishLast_1.publishLast; } });
|
||||
var publishReplay_1 = require("./internal/operators/publishReplay");
|
||||
Object.defineProperty(exports, "publishReplay", { enumerable: true, get: function () { return publishReplay_1.publishReplay; } });
|
||||
var raceWith_1 = require("./internal/operators/raceWith");
|
||||
Object.defineProperty(exports, "raceWith", { enumerable: true, get: function () { return raceWith_1.raceWith; } });
|
||||
var reduce_1 = require("./internal/operators/reduce");
|
||||
Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_1.reduce; } });
|
||||
var repeat_1 = require("./internal/operators/repeat");
|
||||
Object.defineProperty(exports, "repeat", { enumerable: true, get: function () { return repeat_1.repeat; } });
|
||||
var repeatWhen_1 = require("./internal/operators/repeatWhen");
|
||||
Object.defineProperty(exports, "repeatWhen", { enumerable: true, get: function () { return repeatWhen_1.repeatWhen; } });
|
||||
var retry_1 = require("./internal/operators/retry");
|
||||
Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return retry_1.retry; } });
|
||||
var retryWhen_1 = require("./internal/operators/retryWhen");
|
||||
Object.defineProperty(exports, "retryWhen", { enumerable: true, get: function () { return retryWhen_1.retryWhen; } });
|
||||
var refCount_1 = require("./internal/operators/refCount");
|
||||
Object.defineProperty(exports, "refCount", { enumerable: true, get: function () { return refCount_1.refCount; } });
|
||||
var sample_1 = require("./internal/operators/sample");
|
||||
Object.defineProperty(exports, "sample", { enumerable: true, get: function () { return sample_1.sample; } });
|
||||
var sampleTime_1 = require("./internal/operators/sampleTime");
|
||||
Object.defineProperty(exports, "sampleTime", { enumerable: true, get: function () { return sampleTime_1.sampleTime; } });
|
||||
var scan_1 = require("./internal/operators/scan");
|
||||
Object.defineProperty(exports, "scan", { enumerable: true, get: function () { return scan_1.scan; } });
|
||||
var sequenceEqual_1 = require("./internal/operators/sequenceEqual");
|
||||
Object.defineProperty(exports, "sequenceEqual", { enumerable: true, get: function () { return sequenceEqual_1.sequenceEqual; } });
|
||||
var share_1 = require("./internal/operators/share");
|
||||
Object.defineProperty(exports, "share", { enumerable: true, get: function () { return share_1.share; } });
|
||||
var shareReplay_1 = require("./internal/operators/shareReplay");
|
||||
Object.defineProperty(exports, "shareReplay", { enumerable: true, get: function () { return shareReplay_1.shareReplay; } });
|
||||
var single_1 = require("./internal/operators/single");
|
||||
Object.defineProperty(exports, "single", { enumerable: true, get: function () { return single_1.single; } });
|
||||
var skip_1 = require("./internal/operators/skip");
|
||||
Object.defineProperty(exports, "skip", { enumerable: true, get: function () { return skip_1.skip; } });
|
||||
var skipLast_1 = require("./internal/operators/skipLast");
|
||||
Object.defineProperty(exports, "skipLast", { enumerable: true, get: function () { return skipLast_1.skipLast; } });
|
||||
var skipUntil_1 = require("./internal/operators/skipUntil");
|
||||
Object.defineProperty(exports, "skipUntil", { enumerable: true, get: function () { return skipUntil_1.skipUntil; } });
|
||||
var skipWhile_1 = require("./internal/operators/skipWhile");
|
||||
Object.defineProperty(exports, "skipWhile", { enumerable: true, get: function () { return skipWhile_1.skipWhile; } });
|
||||
var startWith_1 = require("./internal/operators/startWith");
|
||||
Object.defineProperty(exports, "startWith", { enumerable: true, get: function () { return startWith_1.startWith; } });
|
||||
var subscribeOn_1 = require("./internal/operators/subscribeOn");
|
||||
Object.defineProperty(exports, "subscribeOn", { enumerable: true, get: function () { return subscribeOn_1.subscribeOn; } });
|
||||
var switchAll_1 = require("./internal/operators/switchAll");
|
||||
Object.defineProperty(exports, "switchAll", { enumerable: true, get: function () { return switchAll_1.switchAll; } });
|
||||
var switchMap_1 = require("./internal/operators/switchMap");
|
||||
Object.defineProperty(exports, "switchMap", { enumerable: true, get: function () { return switchMap_1.switchMap; } });
|
||||
var switchMapTo_1 = require("./internal/operators/switchMapTo");
|
||||
Object.defineProperty(exports, "switchMapTo", { enumerable: true, get: function () { return switchMapTo_1.switchMapTo; } });
|
||||
var switchScan_1 = require("./internal/operators/switchScan");
|
||||
Object.defineProperty(exports, "switchScan", { enumerable: true, get: function () { return switchScan_1.switchScan; } });
|
||||
var take_1 = require("./internal/operators/take");
|
||||
Object.defineProperty(exports, "take", { enumerable: true, get: function () { return take_1.take; } });
|
||||
var takeLast_1 = require("./internal/operators/takeLast");
|
||||
Object.defineProperty(exports, "takeLast", { enumerable: true, get: function () { return takeLast_1.takeLast; } });
|
||||
var takeUntil_1 = require("./internal/operators/takeUntil");
|
||||
Object.defineProperty(exports, "takeUntil", { enumerable: true, get: function () { return takeUntil_1.takeUntil; } });
|
||||
var takeWhile_1 = require("./internal/operators/takeWhile");
|
||||
Object.defineProperty(exports, "takeWhile", { enumerable: true, get: function () { return takeWhile_1.takeWhile; } });
|
||||
var tap_1 = require("./internal/operators/tap");
|
||||
Object.defineProperty(exports, "tap", { enumerable: true, get: function () { return tap_1.tap; } });
|
||||
var throttle_1 = require("./internal/operators/throttle");
|
||||
Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return throttle_1.throttle; } });
|
||||
var throttleTime_1 = require("./internal/operators/throttleTime");
|
||||
Object.defineProperty(exports, "throttleTime", { enumerable: true, get: function () { return throttleTime_1.throttleTime; } });
|
||||
var throwIfEmpty_1 = require("./internal/operators/throwIfEmpty");
|
||||
Object.defineProperty(exports, "throwIfEmpty", { enumerable: true, get: function () { return throwIfEmpty_1.throwIfEmpty; } });
|
||||
var timeInterval_1 = require("./internal/operators/timeInterval");
|
||||
Object.defineProperty(exports, "timeInterval", { enumerable: true, get: function () { return timeInterval_1.timeInterval; } });
|
||||
var timeout_2 = require("./internal/operators/timeout");
|
||||
Object.defineProperty(exports, "timeout", { enumerable: true, get: function () { return timeout_2.timeout; } });
|
||||
var timeoutWith_1 = require("./internal/operators/timeoutWith");
|
||||
Object.defineProperty(exports, "timeoutWith", { enumerable: true, get: function () { return timeoutWith_1.timeoutWith; } });
|
||||
var timestamp_1 = require("./internal/operators/timestamp");
|
||||
Object.defineProperty(exports, "timestamp", { enumerable: true, get: function () { return timestamp_1.timestamp; } });
|
||||
var toArray_1 = require("./internal/operators/toArray");
|
||||
Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_1.toArray; } });
|
||||
var window_1 = require("./internal/operators/window");
|
||||
Object.defineProperty(exports, "window", { enumerable: true, get: function () { return window_1.window; } });
|
||||
var windowCount_1 = require("./internal/operators/windowCount");
|
||||
Object.defineProperty(exports, "windowCount", { enumerable: true, get: function () { return windowCount_1.windowCount; } });
|
||||
var windowTime_1 = require("./internal/operators/windowTime");
|
||||
Object.defineProperty(exports, "windowTime", { enumerable: true, get: function () { return windowTime_1.windowTime; } });
|
||||
var windowToggle_1 = require("./internal/operators/windowToggle");
|
||||
Object.defineProperty(exports, "windowToggle", { enumerable: true, get: function () { return windowToggle_1.windowToggle; } });
|
||||
var windowWhen_1 = require("./internal/operators/windowWhen");
|
||||
Object.defineProperty(exports, "windowWhen", { enumerable: true, get: function () { return windowWhen_1.windowWhen; } });
|
||||
var withLatestFrom_1 = require("./internal/operators/withLatestFrom");
|
||||
Object.defineProperty(exports, "withLatestFrom", { enumerable: true, get: function () { return withLatestFrom_1.withLatestFrom; } });
|
||||
var zipAll_1 = require("./internal/operators/zipAll");
|
||||
Object.defineProperty(exports, "zipAll", { enumerable: true, get: function () { return zipAll_1.zipAll; } });
|
||||
var zipWith_1 = require("./internal/operators/zipWith");
|
||||
Object.defineProperty(exports, "zipWith", { enumerable: true, get: function () { return zipWith_1.zipWith; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,68 @@
|
||||
import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';
|
||||
import { Observable } from '../Observable';
|
||||
import { OperatorFunction } from '../types';
|
||||
import { filter } from './filter';
|
||||
import { throwIfEmpty } from './throwIfEmpty';
|
||||
import { defaultIfEmpty } from './defaultIfEmpty';
|
||||
import { take } from './take';
|
||||
|
||||
/**
|
||||
* Emits the single value at the specified `index` in a sequence of emissions
|
||||
* from the source Observable.
|
||||
*
|
||||
* <span class="informal">Emits only the i-th value, then completes.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `elementAt` returns an Observable that emits the item at the specified
|
||||
* `index` in the source Observable, or a default value if that `index` is out
|
||||
* of range and the `default` argument is provided. If the `default` argument is
|
||||
* not given and the `index` is out of range, the output Observable will emit an
|
||||
* `ArgumentOutOfRangeError` error.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Emit only the third click event
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, elementAt } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(elementAt(2));
|
||||
* result.subscribe(x => console.log(x));
|
||||
*
|
||||
* // Results in:
|
||||
* // click 1 = nothing
|
||||
* // click 2 = nothing
|
||||
* // click 3 = MouseEvent object logged to console
|
||||
* ```
|
||||
*
|
||||
* @see {@link first}
|
||||
* @see {@link last}
|
||||
* @see {@link skip}
|
||||
* @see {@link single}
|
||||
* @see {@link take}
|
||||
*
|
||||
* @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an
|
||||
* ArgumentOutOfRangeError to the Observer's `error` callback if `i < 0` or the
|
||||
* Observable has completed before emitting the i-th `next` notification.
|
||||
*
|
||||
* @param {number} index Is the number `i` for the i-th source emission that has
|
||||
* happened since the subscription, starting from the number `0`.
|
||||
* @param {T} [defaultValue] The default value returned for missing indices.
|
||||
* @return A function that returns an Observable that emits a single item, if
|
||||
* it is found. Otherwise, it will emit the default value if given. If not, it
|
||||
* emits an error.
|
||||
*/
|
||||
export function elementAt<T, D = T>(index: number, defaultValue?: D): OperatorFunction<T, T | D> {
|
||||
if (index < 0) {
|
||||
throw new ArgumentOutOfRangeError();
|
||||
}
|
||||
const hasDefaultValue = arguments.length >= 2;
|
||||
return (source: Observable<T>) =>
|
||||
source.pipe(
|
||||
filter((v, i) => i === index),
|
||||
take(1),
|
||||
hasDefaultValue ? defaultIfEmpty(defaultValue!) : throwIfEmpty(() => new ArgumentOutOfRangeError())
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// Polyfills friendly, therefore ES5 syntax
|
||||
|
||||
"use strict";
|
||||
|
||||
var isObject = require("../object/is");
|
||||
|
||||
var iteratorSymbol = Symbol.iterator;
|
||||
|
||||
if (!iteratorSymbol) {
|
||||
throw new Error("Cannot initialize iterator/is due to Symbol.iterator not being implemented");
|
||||
}
|
||||
|
||||
module.exports = function (value/*, options*/) {
|
||||
var options = arguments[1];
|
||||
if (!isObject(value)) {
|
||||
if (!isObject(options) || !options.allowString || typeof value !== "string") return false;
|
||||
}
|
||||
try {
|
||||
if (typeof value[iteratorSymbol] !== "function") return false;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
if (!options) return true;
|
||||
if (options.denyEmpty) {
|
||||
try {
|
||||
if (value[iteratorSymbol]().next().done) return false;
|
||||
} catch (error) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mergeAll.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/mergeAll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,eAAe,CAAC,GAAG,CAAC,EAAE,UAAU,GAAE,MAAiB,GAAG,gBAAgB,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAE/H"}
|
||||
@@ -0,0 +1,22 @@
|
||||
# gitignore
|
||||
.DS_Store
|
||||
.monitor
|
||||
.*.swp
|
||||
.nodemonignore
|
||||
releases
|
||||
*.log
|
||||
*.err
|
||||
fleet.json
|
||||
public/browserify
|
||||
bin/*.json
|
||||
.bin
|
||||
build
|
||||
compile
|
||||
.lock-wscript
|
||||
coverage
|
||||
node_modules
|
||||
|
||||
# Only apps should have lockfiles
|
||||
npm-shrinkwrap.json
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
@@ -0,0 +1,47 @@
|
||||
import { TemplateNode, Ast, ParserOptions, Fragment, Style, Script } from '../interfaces';
|
||||
interface LastAutoClosedTag {
|
||||
tag: string;
|
||||
reason: string;
|
||||
depth: number;
|
||||
}
|
||||
export declare class Parser {
|
||||
readonly template: string;
|
||||
readonly filename?: string;
|
||||
readonly customElement: boolean;
|
||||
readonly css_mode: 'injected' | 'external' | 'none' | boolean;
|
||||
index: number;
|
||||
stack: TemplateNode[];
|
||||
html: Fragment;
|
||||
css: Style[];
|
||||
js: Script[];
|
||||
meta_tags: {};
|
||||
last_auto_closed_tag?: LastAutoClosedTag;
|
||||
constructor(template: string, options: ParserOptions);
|
||||
current(): TemplateNode;
|
||||
acorn_error(err: any): void;
|
||||
error({ code, message }: {
|
||||
code: string;
|
||||
message: string;
|
||||
}, index?: number): void;
|
||||
eat(str: string, required?: boolean, error?: {
|
||||
code: string;
|
||||
message: string;
|
||||
}): boolean;
|
||||
match(str: string): boolean;
|
||||
/**
|
||||
* Match a regex at the current index
|
||||
* @param pattern Should have a ^ anchor at the start so the regex doesn't search past the beginning, resulting in worse performance
|
||||
*/
|
||||
match_regex(pattern: RegExp): string;
|
||||
allow_whitespace(): void;
|
||||
/**
|
||||
* Search for a regex starting at the current index and return the result if it matches
|
||||
* @param pattern Should have a ^ anchor at the start so the regex doesn't search past the beginning, resulting in worse performance
|
||||
*/
|
||||
read(pattern: RegExp): string;
|
||||
read_identifier(allow_reserved?: boolean): string;
|
||||
read_until(pattern: RegExp, error_message?: Parameters<Parser['error']>[0]): string;
|
||||
require_whitespace(): void;
|
||||
}
|
||||
export default function parse(template: string, options?: ParserOptions): Ast;
|
||||
export {};
|
||||
@@ -0,0 +1,75 @@
|
||||
"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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ReplaySubject = void 0;
|
||||
var Subject_1 = require("./Subject");
|
||||
var dateTimestampProvider_1 = require("./scheduler/dateTimestampProvider");
|
||||
var ReplaySubject = (function (_super) {
|
||||
__extends(ReplaySubject, _super);
|
||||
function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {
|
||||
if (_bufferSize === void 0) { _bufferSize = Infinity; }
|
||||
if (_windowTime === void 0) { _windowTime = Infinity; }
|
||||
if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider_1.dateTimestampProvider; }
|
||||
var _this = _super.call(this) || this;
|
||||
_this._bufferSize = _bufferSize;
|
||||
_this._windowTime = _windowTime;
|
||||
_this._timestampProvider = _timestampProvider;
|
||||
_this._buffer = [];
|
||||
_this._infiniteTimeWindow = true;
|
||||
_this._infiniteTimeWindow = _windowTime === Infinity;
|
||||
_this._bufferSize = Math.max(1, _bufferSize);
|
||||
_this._windowTime = Math.max(1, _windowTime);
|
||||
return _this;
|
||||
}
|
||||
ReplaySubject.prototype.next = function (value) {
|
||||
var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;
|
||||
if (!isStopped) {
|
||||
_buffer.push(value);
|
||||
!_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);
|
||||
}
|
||||
this._trimBuffer();
|
||||
_super.prototype.next.call(this, value);
|
||||
};
|
||||
ReplaySubject.prototype._subscribe = function (subscriber) {
|
||||
this._throwIfClosed();
|
||||
this._trimBuffer();
|
||||
var subscription = this._innerSubscribe(subscriber);
|
||||
var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;
|
||||
var copy = _buffer.slice();
|
||||
for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {
|
||||
subscriber.next(copy[i]);
|
||||
}
|
||||
this._checkFinalizedStatuses(subscriber);
|
||||
return subscription;
|
||||
};
|
||||
ReplaySubject.prototype._trimBuffer = function () {
|
||||
var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;
|
||||
var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;
|
||||
_bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);
|
||||
if (!_infiniteTimeWindow) {
|
||||
var now = _timestampProvider.now();
|
||||
var last = 0;
|
||||
for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {
|
||||
last = i;
|
||||
}
|
||||
last && _buffer.splice(0, last + 1);
|
||||
}
|
||||
};
|
||||
return ReplaySubject;
|
||||
}(Subject_1.Subject));
|
||||
exports.ReplaySubject = ReplaySubject;
|
||||
//# sourceMappingURL=ReplaySubject.js.map
|
||||
@@ -0,0 +1,82 @@
|
||||
{
|
||||
"name": "@sindresorhus/is",
|
||||
"version": "5.3.0",
|
||||
"description": "Type check values",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/is",
|
||||
"funding": "https://github.com/sindresorhus/is?sponsor=1",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=14.16"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "del dist && tsc",
|
||||
"test": "xo && ava",
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"keywords": [
|
||||
"type",
|
||||
"types",
|
||||
"is",
|
||||
"check",
|
||||
"checking",
|
||||
"validate",
|
||||
"validation",
|
||||
"utility",
|
||||
"util",
|
||||
"typeof",
|
||||
"instanceof",
|
||||
"object",
|
||||
"assert",
|
||||
"assertion",
|
||||
"test",
|
||||
"kind",
|
||||
"primitive",
|
||||
"verify",
|
||||
"compare",
|
||||
"typescript",
|
||||
"typeguards",
|
||||
"types"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@sindresorhus/tsconfig": "^3.0.1",
|
||||
"@types/jsdom": "^16.2.15",
|
||||
"@types/node": "^18.0.6",
|
||||
"@types/zen-observable": "^0.8.3",
|
||||
"ava": "^4.3.1",
|
||||
"del-cli": "^5.0.0",
|
||||
"jsdom": "^20.0.0",
|
||||
"rxjs": "^7.5.6",
|
||||
"tempy": "^3.0.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "~4.7.4",
|
||||
"xo": "^0.51.0",
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"ava": {
|
||||
"extensions": {
|
||||
"ts": "module"
|
||||
},
|
||||
"nodeArguments": [
|
||||
"--loader=ts-node/esm"
|
||||
]
|
||||
},
|
||||
"xo": {
|
||||
"rules": {
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
"@typescript-eslint/triple-slash-reference": "off"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[1143] = (function(){ var d = "\u0000\u0001\u0002\u0003\t\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013
\b\u0018\u0019\u001c\u001d\u001e\u001f\n\u0017\u001b\u0005\u0006\u0007\u0016\u0004\u0014\u0015\u001a â{àáã}çñ§.<(+!&`êëèíîïì߀Å*);^-/Â#ÀÁÃ$ÇÑö,%_>?ø\\ÊËÈÍÎÏÌé:ÄÖ'=\"Øabcdefghi«»ðýþ±°jklmnopqrªºæ¸Æ]µüstuvwxyz¡¿ÐÝÞ®¢£¥·©[¶¼½¾¬|¯¨´×äABCDEFGHIô¦òóõåJKLMNOPQR¹û~ùúÿÉ÷STUVWXYZ²Ô@ÒÓÕ0123456789³ÛÜÙÚ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('sortedLastIndexOf', require('../sortedLastIndexOf'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('pullAll', require('../pullAll'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,311 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* html-minifier CLI tool
|
||||
*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014-2016 Zoltan Frombach
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var camelCase = require('camel-case');
|
||||
var fs = require('fs');
|
||||
var info = require('./package.json');
|
||||
var minify = require('./' + info.main).minify;
|
||||
var paramCase = require('param-case');
|
||||
var path = require('path');
|
||||
var program = require('commander');
|
||||
|
||||
program._name = info.name;
|
||||
program.version(info.version);
|
||||
|
||||
function fatal(message) {
|
||||
console.error(message);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON does not support regexes, so, e.g., JSON.parse() will not create
|
||||
* a RegExp from the JSON value `[ "/matchString/" ]`, which is
|
||||
* technically just an array containing a string that begins and end with
|
||||
* a forward slash. To get a RegExp from a JSON string, it must be
|
||||
* constructed explicitly in JavaScript.
|
||||
*
|
||||
* The likelihood of actually wanting to match text that is enclosed in
|
||||
* forward slashes is probably quite rare, so if forward slashes were
|
||||
* included in an argument that requires a regex, the user most likely
|
||||
* thought they were part of the syntax for specifying a regex.
|
||||
*
|
||||
* In the unlikely case that forward slashes are indeed desired in the
|
||||
* search string, the user would need to enclose the expression in a
|
||||
* second set of slashes:
|
||||
*
|
||||
* --customAttrSrround "[\"//matchString//\"]"
|
||||
*/
|
||||
function parseRegExp(value) {
|
||||
if (value) {
|
||||
return new RegExp(value.replace(/^\/(.*)\/$/, '$1'));
|
||||
}
|
||||
}
|
||||
|
||||
function parseJSON(value) {
|
||||
if (value) {
|
||||
try {
|
||||
return JSON.parse(value);
|
||||
}
|
||||
catch (e) {
|
||||
if (/^{/.test(value)) {
|
||||
fatal('Could not parse JSON value \'' + value + '\'');
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseJSONArray(value) {
|
||||
if (value) {
|
||||
value = parseJSON(value);
|
||||
return Array.isArray(value) ? value : [value];
|
||||
}
|
||||
}
|
||||
|
||||
function parseJSONRegExpArray(value) {
|
||||
value = parseJSONArray(value);
|
||||
return value && value.map(parseRegExp);
|
||||
}
|
||||
|
||||
function parseString(value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
var mainOptions = {
|
||||
caseSensitive: 'Treat attributes in case sensitive manner (useful for SVG; e.g. viewBox)',
|
||||
collapseBooleanAttributes: 'Omit attribute values from boolean attributes',
|
||||
collapseInlineTagWhitespace: 'Collapse white space around inline tag',
|
||||
collapseWhitespace: 'Collapse white space that contributes to text nodes in a document tree.',
|
||||
conservativeCollapse: 'Always collapse to 1 space (never remove it entirely)',
|
||||
continueOnParseError: 'Handle parse errors instead of aborting',
|
||||
customAttrAssign: ['Arrays of regex\'es that allow to support custom attribute assign expressions (e.g. \'<div flex?="{{mode != cover}}"></div>\')', parseJSONRegExpArray],
|
||||
customAttrCollapse: ['Regex that specifies custom attribute to strip newlines from (e.g. /ng-class/)', parseRegExp],
|
||||
customAttrSurround: ['Arrays of regex\'es that allow to support custom attribute surround expressions (e.g. <input {{#if value}}checked="checked"{{/if}}>)', parseJSONRegExpArray],
|
||||
customEventAttributes: ['Arrays of regex\'es that allow to support custom event attributes for minifyJS (e.g. ng-click)', parseJSONRegExpArray],
|
||||
decodeEntities: 'Use direct Unicode characters whenever possible',
|
||||
html5: 'Parse input according to HTML5 specifications',
|
||||
ignoreCustomComments: ['Array of regex\'es that allow to ignore certain comments, when matched', parseJSONRegExpArray],
|
||||
ignoreCustomFragments: ['Array of regex\'es that allow to ignore certain fragments, when matched (e.g. <?php ... ?>, {{ ... }})', parseJSONRegExpArray],
|
||||
includeAutoGeneratedTags: 'Insert tags generated by HTML parser',
|
||||
keepClosingSlash: 'Keep the trailing slash on singleton elements',
|
||||
maxLineLength: ['Max line length', parseInt],
|
||||
minifyCSS: ['Minify CSS in style elements and style attributes (uses clean-css)', parseJSON],
|
||||
minifyJS: ['Minify Javascript in script elements and on* attributes (uses uglify-js)', parseJSON],
|
||||
minifyURLs: ['Minify URLs in various attributes (uses relateurl)', parseJSON],
|
||||
preserveLineBreaks: 'Always collapse to 1 line break (never remove it entirely) when whitespace between tags include a line break.',
|
||||
preventAttributesEscaping: 'Prevents the escaping of the values of attributes.',
|
||||
processConditionalComments: 'Process contents of conditional comments through minifier',
|
||||
processScripts: ['Array of strings corresponding to types of script elements to process through minifier (e.g. "text/ng-template", "text/x-handlebars-template", etc.)', parseJSONArray],
|
||||
quoteCharacter: ['Type of quote to use for attribute values (\' or ")', parseString],
|
||||
removeAttributeQuotes: 'Remove quotes around attributes when possible.',
|
||||
removeComments: 'Strip HTML comments',
|
||||
removeEmptyAttributes: 'Remove all attributes with whitespace-only values',
|
||||
removeEmptyElements: 'Remove all elements with empty contents',
|
||||
removeOptionalTags: 'Remove unrequired tags',
|
||||
removeRedundantAttributes: 'Remove attributes when value matches default.',
|
||||
removeScriptTypeAttributes: 'Remove type="text/javascript" from script tags. Other type attribute values are left intact.',
|
||||
removeStyleLinkTypeAttributes: 'Remove type="text/css" from style and link tags. Other type attribute values are left intact.',
|
||||
removeTagWhitespace: 'Remove space between attributes whenever possible',
|
||||
sortAttributes: 'Sort attributes by frequency',
|
||||
sortClassName: 'Sort style classes by frequency',
|
||||
trimCustomFragments: 'Trim white space around ignoreCustomFragments.',
|
||||
useShortDoctype: 'Replaces the doctype with the short (HTML5) doctype'
|
||||
};
|
||||
var mainOptionKeys = Object.keys(mainOptions);
|
||||
mainOptionKeys.forEach(function(key) {
|
||||
var option = mainOptions[key];
|
||||
if (Array.isArray(option)) {
|
||||
key = key === 'minifyURLs' ? '--minify-urls' : '--' + paramCase(key);
|
||||
key += option[1] === parseJSON ? ' [value]' : ' <value>';
|
||||
program.option(key, option[0], option[1]);
|
||||
}
|
||||
else if (~['html5', 'includeAutoGeneratedTags'].indexOf(key)) {
|
||||
program.option('--no-' + paramCase(key), option);
|
||||
}
|
||||
else {
|
||||
program.option('--' + paramCase(key), option);
|
||||
}
|
||||
});
|
||||
program.option('-o --output <file>', 'Specify output file (if not specified STDOUT will be used for output)');
|
||||
|
||||
function readFile(file) {
|
||||
try {
|
||||
return fs.readFileSync(file, { encoding: 'utf8' });
|
||||
}
|
||||
catch (e) {
|
||||
fatal('Cannot read ' + file + '\n' + e.message);
|
||||
}
|
||||
}
|
||||
|
||||
var config = {};
|
||||
program.option('-c --config-file <file>', 'Use config file', function(configPath) {
|
||||
var data = readFile(configPath);
|
||||
try {
|
||||
config = JSON.parse(data);
|
||||
}
|
||||
catch (je) {
|
||||
try {
|
||||
config = require(path.resolve(configPath));
|
||||
}
|
||||
catch (ne) {
|
||||
fatal('Cannot read the specified config file.\nAs JSON: ' + je.message + '\nAs module: ' + ne.message);
|
||||
}
|
||||
}
|
||||
mainOptionKeys.forEach(function(key) {
|
||||
if (key in config) {
|
||||
var option = mainOptions[key];
|
||||
if (Array.isArray(option)) {
|
||||
var value = config[key];
|
||||
config[key] = option[1](typeof value === 'string' ? value : JSON.stringify(value));
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
program.option('--input-dir <dir>', 'Specify an input directory');
|
||||
program.option('--output-dir <dir>', 'Specify an output directory');
|
||||
program.option('--file-ext <text>', 'Specify an extension to be read, ex: html');
|
||||
var content;
|
||||
program.arguments('[files...]').action(function(files) {
|
||||
content = files.map(readFile).join('');
|
||||
}).parse(process.argv);
|
||||
|
||||
function createOptions() {
|
||||
var options = {};
|
||||
mainOptionKeys.forEach(function(key) {
|
||||
var param = program[key === 'minifyURLs' ? 'minifyUrls' : camelCase(key)];
|
||||
if (typeof param !== 'undefined') {
|
||||
options[key] = param;
|
||||
}
|
||||
else if (key in config) {
|
||||
options[key] = config[key];
|
||||
}
|
||||
});
|
||||
return options;
|
||||
}
|
||||
|
||||
function mkdir(outputDir, callback) {
|
||||
fs.mkdir(outputDir, function(err) {
|
||||
if (err) {
|
||||
switch (err.code) {
|
||||
case 'ENOENT':
|
||||
return mkdir(path.join(outputDir, '..'), function() {
|
||||
mkdir(outputDir, callback);
|
||||
});
|
||||
case 'EEXIST':
|
||||
break;
|
||||
default:
|
||||
fatal('Cannot create directory ' + outputDir + '\n' + err.message);
|
||||
}
|
||||
}
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
function processFile(inputFile, outputFile) {
|
||||
fs.readFile(inputFile, { encoding: 'utf8' }, function(err, data) {
|
||||
if (err) {
|
||||
fatal('Cannot read ' + inputFile + '\n' + err.message);
|
||||
}
|
||||
var minified;
|
||||
try {
|
||||
minified = minify(data, createOptions());
|
||||
}
|
||||
catch (e) {
|
||||
fatal('Minification error on ' + inputFile + '\n' + e.message);
|
||||
}
|
||||
fs.writeFile(outputFile, minified, { encoding: 'utf8' }, function(err) {
|
||||
if (err) {
|
||||
fatal('Cannot write ' + outputFile + '\n' + err.message);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function processDirectory(inputDir, outputDir, fileExt) {
|
||||
fs.readdir(inputDir, function(err, files) {
|
||||
if (err) {
|
||||
fatal('Cannot read directory ' + inputDir + '\n' + err.message);
|
||||
}
|
||||
files.forEach(function(file) {
|
||||
var inputFile = path.join(inputDir, file);
|
||||
var outputFile = path.join(outputDir, file);
|
||||
fs.stat(inputFile, function(err, stat) {
|
||||
if (err) {
|
||||
fatal('Cannot read ' + inputFile + '\n' + err.message);
|
||||
}
|
||||
else if (stat.isDirectory()) {
|
||||
processDirectory(inputFile, outputFile, fileExt);
|
||||
}
|
||||
else if (!fileExt || path.extname(file) === '.' + fileExt) {
|
||||
mkdir(outputDir, function() {
|
||||
processFile(inputFile, outputFile);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function writeMinify() {
|
||||
var minified;
|
||||
try {
|
||||
minified = minify(content, createOptions());
|
||||
}
|
||||
catch (e) {
|
||||
fatal('Minification error:\n' + e.message);
|
||||
}
|
||||
(program.output ? fs.createWriteStream(program.output).on('error', function(e) {
|
||||
fatal('Cannot write ' + program.output + '\n' + e.message);
|
||||
}) : process.stdout).write(minified);
|
||||
}
|
||||
|
||||
var inputDir = program.inputDir;
|
||||
var outputDir = program.outputDir;
|
||||
var fileExt = program.fileExt;
|
||||
if (inputDir || outputDir) {
|
||||
if (!inputDir) {
|
||||
fatal('The option output-dir needs to be used with the option input-dir. If you are working with a single file, use -o.');
|
||||
}
|
||||
else if (!outputDir) {
|
||||
fatal('You need to specify where to write the output files with the option --output-dir');
|
||||
}
|
||||
processDirectory(inputDir, outputDir, fileExt);
|
||||
}
|
||||
// Minifying one or more files specified on the CMD line
|
||||
else if (content) {
|
||||
writeMinify();
|
||||
}
|
||||
// Minifying input coming from STDIN
|
||||
else {
|
||||
content = '';
|
||||
process.stdin.setEncoding('utf8');
|
||||
process.stdin.on('data', function(data) {
|
||||
content += data;
|
||||
}).on('end', writeMinify);
|
||||
}
|
||||
@@ -0,0 +1,218 @@
|
||||
import assert from './_assert.js';
|
||||
import { sha256 } from './sha256.js';
|
||||
import { pbkdf2 } from './pbkdf2.js';
|
||||
import { asyncLoop, checkOpts, u32 } from './utils.js';
|
||||
// RFC 7914 Scrypt KDF
|
||||
// Left rotate for uint32
|
||||
const rotl = (a, b) => (a << b) | (a >>> (32 - b));
|
||||
// The main Scrypt loop: uses Salsa extensively.
|
||||
// Six versions of the function were tried, this is the fastest one.
|
||||
// prettier-ignore
|
||||
function XorAndSalsa(prev, pi, input, ii, out, oi) {
|
||||
// Based on https://cr.yp.to/salsa20.html
|
||||
// Xor blocks
|
||||
let y00 = prev[pi++] ^ input[ii++], y01 = prev[pi++] ^ input[ii++];
|
||||
let y02 = prev[pi++] ^ input[ii++], y03 = prev[pi++] ^ input[ii++];
|
||||
let y04 = prev[pi++] ^ input[ii++], y05 = prev[pi++] ^ input[ii++];
|
||||
let y06 = prev[pi++] ^ input[ii++], y07 = prev[pi++] ^ input[ii++];
|
||||
let y08 = prev[pi++] ^ input[ii++], y09 = prev[pi++] ^ input[ii++];
|
||||
let y10 = prev[pi++] ^ input[ii++], y11 = prev[pi++] ^ input[ii++];
|
||||
let y12 = prev[pi++] ^ input[ii++], y13 = prev[pi++] ^ input[ii++];
|
||||
let y14 = prev[pi++] ^ input[ii++], y15 = prev[pi++] ^ input[ii++];
|
||||
// Save state to temporary variables (salsa)
|
||||
let x00 = y00, x01 = y01, x02 = y02, x03 = y03, x04 = y04, x05 = y05, x06 = y06, x07 = y07, x08 = y08, x09 = y09, x10 = y10, x11 = y11, x12 = y12, x13 = y13, x14 = y14, x15 = y15;
|
||||
// Main loop (salsa)
|
||||
for (let i = 0; i < 8; i += 2) {
|
||||
x04 ^= rotl(x00 + x12 | 0, 7);
|
||||
x08 ^= rotl(x04 + x00 | 0, 9);
|
||||
x12 ^= rotl(x08 + x04 | 0, 13);
|
||||
x00 ^= rotl(x12 + x08 | 0, 18);
|
||||
x09 ^= rotl(x05 + x01 | 0, 7);
|
||||
x13 ^= rotl(x09 + x05 | 0, 9);
|
||||
x01 ^= rotl(x13 + x09 | 0, 13);
|
||||
x05 ^= rotl(x01 + x13 | 0, 18);
|
||||
x14 ^= rotl(x10 + x06 | 0, 7);
|
||||
x02 ^= rotl(x14 + x10 | 0, 9);
|
||||
x06 ^= rotl(x02 + x14 | 0, 13);
|
||||
x10 ^= rotl(x06 + x02 | 0, 18);
|
||||
x03 ^= rotl(x15 + x11 | 0, 7);
|
||||
x07 ^= rotl(x03 + x15 | 0, 9);
|
||||
x11 ^= rotl(x07 + x03 | 0, 13);
|
||||
x15 ^= rotl(x11 + x07 | 0, 18);
|
||||
x01 ^= rotl(x00 + x03 | 0, 7);
|
||||
x02 ^= rotl(x01 + x00 | 0, 9);
|
||||
x03 ^= rotl(x02 + x01 | 0, 13);
|
||||
x00 ^= rotl(x03 + x02 | 0, 18);
|
||||
x06 ^= rotl(x05 + x04 | 0, 7);
|
||||
x07 ^= rotl(x06 + x05 | 0, 9);
|
||||
x04 ^= rotl(x07 + x06 | 0, 13);
|
||||
x05 ^= rotl(x04 + x07 | 0, 18);
|
||||
x11 ^= rotl(x10 + x09 | 0, 7);
|
||||
x08 ^= rotl(x11 + x10 | 0, 9);
|
||||
x09 ^= rotl(x08 + x11 | 0, 13);
|
||||
x10 ^= rotl(x09 + x08 | 0, 18);
|
||||
x12 ^= rotl(x15 + x14 | 0, 7);
|
||||
x13 ^= rotl(x12 + x15 | 0, 9);
|
||||
x14 ^= rotl(x13 + x12 | 0, 13);
|
||||
x15 ^= rotl(x14 + x13 | 0, 18);
|
||||
}
|
||||
// Write output (salsa)
|
||||
out[oi++] = (y00 + x00) | 0;
|
||||
out[oi++] = (y01 + x01) | 0;
|
||||
out[oi++] = (y02 + x02) | 0;
|
||||
out[oi++] = (y03 + x03) | 0;
|
||||
out[oi++] = (y04 + x04) | 0;
|
||||
out[oi++] = (y05 + x05) | 0;
|
||||
out[oi++] = (y06 + x06) | 0;
|
||||
out[oi++] = (y07 + x07) | 0;
|
||||
out[oi++] = (y08 + x08) | 0;
|
||||
out[oi++] = (y09 + x09) | 0;
|
||||
out[oi++] = (y10 + x10) | 0;
|
||||
out[oi++] = (y11 + x11) | 0;
|
||||
out[oi++] = (y12 + x12) | 0;
|
||||
out[oi++] = (y13 + x13) | 0;
|
||||
out[oi++] = (y14 + x14) | 0;
|
||||
out[oi++] = (y15 + x15) | 0;
|
||||
}
|
||||
function BlockMix(input, ii, out, oi, r) {
|
||||
// The block B is r 128-byte chunks (which is equivalent of 2r 64-byte chunks)
|
||||
let head = oi + 0;
|
||||
let tail = oi + 16 * r;
|
||||
for (let i = 0; i < 16; i++)
|
||||
out[tail + i] = input[ii + (2 * r - 1) * 16 + i]; // X ← B[2r−1]
|
||||
for (let i = 0; i < r; i++, head += 16, ii += 16) {
|
||||
// We write odd & even Yi at same time. Even: 0bXXXXX0 Odd: 0bXXXXX1
|
||||
XorAndSalsa(out, tail, input, ii, out, head); // head[i] = Salsa(blockIn[2*i] ^ tail[i-1])
|
||||
if (i > 0)
|
||||
tail += 16; // First iteration overwrites tmp value in tail
|
||||
XorAndSalsa(out, head, input, (ii += 16), out, tail); // tail[i] = Salsa(blockIn[2*i+1] ^ head[i])
|
||||
}
|
||||
}
|
||||
// Common prologue and epilogue for sync/async functions
|
||||
function scryptInit(password, salt, _opts) {
|
||||
// Maxmem - 1GB+1KB by default
|
||||
const opts = checkOpts({
|
||||
dkLen: 32,
|
||||
asyncTick: 10,
|
||||
maxmem: 1024 ** 3 + 1024,
|
||||
}, _opts);
|
||||
const { N, r, p, dkLen, asyncTick, maxmem, onProgress } = opts;
|
||||
assert.number(N);
|
||||
assert.number(r);
|
||||
assert.number(p);
|
||||
assert.number(dkLen);
|
||||
assert.number(asyncTick);
|
||||
assert.number(maxmem);
|
||||
if (onProgress !== undefined && typeof onProgress !== 'function')
|
||||
throw new Error('progressCb should be function');
|
||||
const blockSize = 128 * r;
|
||||
const blockSize32 = blockSize / 4;
|
||||
if (N <= 1 || (N & (N - 1)) !== 0 || N >= 2 ** (blockSize / 8) || N > 2 ** 32) {
|
||||
// NOTE: we limit N to be less than 2**32 because of 32 bit variant of Integrify function
|
||||
// There is no JS engines that allows alocate more than 4GB per single Uint8Array for now, but can change in future.
|
||||
throw new Error('Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32');
|
||||
}
|
||||
if (p < 0 || p > ((2 ** 32 - 1) * 32) / blockSize) {
|
||||
throw new Error('Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)');
|
||||
}
|
||||
if (dkLen < 0 || dkLen > (2 ** 32 - 1) * 32) {
|
||||
throw new Error('Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32');
|
||||
}
|
||||
const memUsed = blockSize * (N + p);
|
||||
if (memUsed > maxmem) {
|
||||
throw new Error(`Scrypt: parameters too large, ${memUsed} (128 * r * (N + p)) > ${maxmem} (maxmem)`);
|
||||
}
|
||||
// [B0...Bp−1] ← PBKDF2HMAC-SHA256(Passphrase, Salt, 1, blockSize*ParallelizationFactor)
|
||||
// Since it has only one iteration there is no reason to use async variant
|
||||
const B = pbkdf2(sha256, password, salt, { c: 1, dkLen: blockSize * p });
|
||||
const B32 = u32(B);
|
||||
// Re-used between parallel iterations. Array(iterations) of B
|
||||
const V = u32(new Uint8Array(blockSize * N));
|
||||
const tmp = u32(new Uint8Array(blockSize));
|
||||
let blockMixCb = () => { };
|
||||
if (onProgress) {
|
||||
const totalBlockMix = 2 * N * p;
|
||||
// Invoke callback if progress changes from 10.01 to 10.02
|
||||
// Allows to draw smooth progress bar on up to 8K screen
|
||||
const callbackPer = Math.max(Math.floor(totalBlockMix / 10000), 1);
|
||||
let blockMixCnt = 0;
|
||||
blockMixCb = () => {
|
||||
blockMixCnt++;
|
||||
if (onProgress && (!(blockMixCnt % callbackPer) || blockMixCnt === totalBlockMix))
|
||||
onProgress(blockMixCnt / totalBlockMix);
|
||||
};
|
||||
}
|
||||
return { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick };
|
||||
}
|
||||
function scryptOutput(password, dkLen, B, V, tmp) {
|
||||
const res = pbkdf2(sha256, password, B, { c: 1, dkLen });
|
||||
B.fill(0);
|
||||
V.fill(0);
|
||||
tmp.fill(0);
|
||||
return res;
|
||||
}
|
||||
/**
|
||||
* Scrypt KDF from RFC 7914.
|
||||
* @param password - pass
|
||||
* @param salt - salt
|
||||
* @param opts - parameters
|
||||
* - `N` is cpu/mem work factor (power of 2 e.g. 2**18)
|
||||
* - `r` is block size (8 is common), fine-tunes sequential memory read size and performance
|
||||
* - `p` is parallelization factor (1 is common)
|
||||
* - `dkLen` is output key length in bytes e.g. 32.
|
||||
* - `asyncTick` - (default: 10) max time in ms for which async function can block execution
|
||||
* - `maxmem` - (default: `1024 ** 3 + 1024` aka 1GB+1KB). A limit that the app could use for scrypt
|
||||
* - `onProgress` - callback function that would be executed for progress report
|
||||
* @returns Derived key
|
||||
*/
|
||||
export function scrypt(password, salt, opts) {
|
||||
const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb } = scryptInit(password, salt, opts);
|
||||
for (let pi = 0; pi < p; pi++) {
|
||||
const Pi = blockSize32 * pi;
|
||||
for (let i = 0; i < blockSize32; i++)
|
||||
V[i] = B32[Pi + i]; // V[0] = B[i]
|
||||
for (let i = 0, pos = 0; i < N - 1; i++) {
|
||||
BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);
|
||||
blockMixCb();
|
||||
}
|
||||
BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element
|
||||
blockMixCb();
|
||||
for (let i = 0; i < N; i++) {
|
||||
// First u32 of the last 64-byte block (u32 is LE)
|
||||
const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations
|
||||
for (let k = 0; k < blockSize32; k++)
|
||||
tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]
|
||||
BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])
|
||||
blockMixCb();
|
||||
}
|
||||
}
|
||||
return scryptOutput(password, dkLen, B, V, tmp);
|
||||
}
|
||||
/**
|
||||
* Scrypt KDF from RFC 7914.
|
||||
*/
|
||||
export async function scryptAsync(password, salt, opts) {
|
||||
const { N, r, p, dkLen, blockSize32, V, B32, B, tmp, blockMixCb, asyncTick } = scryptInit(password, salt, opts);
|
||||
for (let pi = 0; pi < p; pi++) {
|
||||
const Pi = blockSize32 * pi;
|
||||
for (let i = 0; i < blockSize32; i++)
|
||||
V[i] = B32[Pi + i]; // V[0] = B[i]
|
||||
let pos = 0;
|
||||
await asyncLoop(N - 1, asyncTick, (i) => {
|
||||
BlockMix(V, pos, V, (pos += blockSize32), r); // V[i] = BlockMix(V[i-1]);
|
||||
blockMixCb();
|
||||
});
|
||||
BlockMix(V, (N - 1) * blockSize32, B32, Pi, r); // Process last element
|
||||
blockMixCb();
|
||||
await asyncLoop(N, asyncTick, (i) => {
|
||||
// First u32 of the last 64-byte block (u32 is LE)
|
||||
const j = B32[Pi + blockSize32 - 16] % N; // j = Integrify(X) % iterations
|
||||
for (let k = 0; k < blockSize32; k++)
|
||||
tmp[k] = B32[Pi + k] ^ V[j * blockSize32 + k]; // tmp = B ^ V[j]
|
||||
BlockMix(tmp, 0, B32, Pi, r); // B = BlockMix(B ^ V[j])
|
||||
blockMixCb();
|
||||
});
|
||||
}
|
||||
return scryptOutput(password, dkLen, B, V, tmp);
|
||||
}
|
||||
//# sourceMappingURL=scrypt.js.map
|
||||
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/resolve
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('assignInAll', require('../assignIn'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,212 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isURL;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
var _isFQDN = _interopRequireDefault(require("./isFQDN"));
|
||||
|
||||
var _isIP = _interopRequireDefault(require("./isIP"));
|
||||
|
||||
var _merge = _interopRequireDefault(require("./util/merge"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
||||
|
||||
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
||||
|
||||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
||||
|
||||
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
||||
|
||||
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
||||
|
||||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
||||
|
||||
/*
|
||||
options for isURL method
|
||||
|
||||
require_protocol - if set as true isURL will return false if protocol is not present in the URL
|
||||
require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option
|
||||
protocols - valid protocols can be modified with this option
|
||||
require_host - if set as false isURL will not check if host is present in the URL
|
||||
require_port - if set as true isURL will check if port is present in the URL
|
||||
allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed
|
||||
validate_length - if set as false isURL will skip string length validation (IE maximum is 2083)
|
||||
|
||||
*/
|
||||
var default_url_options = {
|
||||
protocols: ['http', 'https', 'ftp'],
|
||||
require_tld: true,
|
||||
require_protocol: false,
|
||||
require_host: true,
|
||||
require_port: false,
|
||||
require_valid_protocol: true,
|
||||
allow_underscores: false,
|
||||
allow_trailing_dot: false,
|
||||
allow_protocol_relative_urls: false,
|
||||
allow_fragments: true,
|
||||
allow_query_components: true,
|
||||
validate_length: true
|
||||
};
|
||||
var wrapped_ipv6 = /^\[([^\]]+)\](?::([0-9]+))?$/;
|
||||
|
||||
function isRegExp(obj) {
|
||||
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
||||
}
|
||||
|
||||
function checkHost(host, matches) {
|
||||
for (var i = 0; i < matches.length; i++) {
|
||||
var match = matches[i];
|
||||
|
||||
if (host === match || isRegExp(match) && match.test(host)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function isURL(url, options) {
|
||||
(0, _assertString.default)(url);
|
||||
|
||||
if (!url || /[\s<>]/.test(url)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (url.indexOf('mailto:') === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
options = (0, _merge.default)(options, default_url_options);
|
||||
|
||||
if (options.validate_length && url.length >= 2083) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!options.allow_fragments && url.includes('#')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!options.allow_query_components && (url.includes('?') || url.includes('&'))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var protocol, auth, host, hostname, port, port_str, split, ipv6;
|
||||
split = url.split('#');
|
||||
url = split.shift();
|
||||
split = url.split('?');
|
||||
url = split.shift();
|
||||
split = url.split('://');
|
||||
|
||||
if (split.length > 1) {
|
||||
protocol = split.shift().toLowerCase();
|
||||
|
||||
if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
|
||||
return false;
|
||||
}
|
||||
} else if (options.require_protocol) {
|
||||
return false;
|
||||
} else if (url.slice(0, 2) === '//') {
|
||||
if (!options.allow_protocol_relative_urls) {
|
||||
return false;
|
||||
}
|
||||
|
||||
split[0] = url.slice(2);
|
||||
}
|
||||
|
||||
url = split.join('://');
|
||||
|
||||
if (url === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
split = url.split('/');
|
||||
url = split.shift();
|
||||
|
||||
if (url === '' && !options.require_host) {
|
||||
return true;
|
||||
}
|
||||
|
||||
split = url.split('@');
|
||||
|
||||
if (split.length > 1) {
|
||||
if (options.disallow_auth) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (split[0] === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
auth = split.shift();
|
||||
|
||||
if (auth.indexOf(':') >= 0 && auth.split(':').length > 2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var _auth$split = auth.split(':'),
|
||||
_auth$split2 = _slicedToArray(_auth$split, 2),
|
||||
user = _auth$split2[0],
|
||||
password = _auth$split2[1];
|
||||
|
||||
if (user === '' && password === '') {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
hostname = split.join('@');
|
||||
port_str = null;
|
||||
ipv6 = null;
|
||||
var ipv6_match = hostname.match(wrapped_ipv6);
|
||||
|
||||
if (ipv6_match) {
|
||||
host = '';
|
||||
ipv6 = ipv6_match[1];
|
||||
port_str = ipv6_match[2] || null;
|
||||
} else {
|
||||
split = hostname.split(':');
|
||||
host = split.shift();
|
||||
|
||||
if (split.length) {
|
||||
port_str = split.join(':');
|
||||
}
|
||||
}
|
||||
|
||||
if (port_str !== null && port_str.length > 0) {
|
||||
port = parseInt(port_str, 10);
|
||||
|
||||
if (!/^[0-9]+$/.test(port_str) || port <= 0 || port > 65535) {
|
||||
return false;
|
||||
}
|
||||
} else if (options.require_port) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (options.host_whitelist) {
|
||||
return checkHost(host, options.host_whitelist);
|
||||
}
|
||||
|
||||
if (host === '' && !options.require_host) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(0, _isIP.default)(host) && !(0, _isFQDN.default)(host, options) && (!ipv6 || !(0, _isIP.default)(ipv6, 6))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
host = host || ipv6;
|
||||
|
||||
if (options.host_blacklist && checkHost(host, options.host_blacklist)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"zip.js","sourceRoot":"","sources":["../../../../src/internal/observable/zip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA2C;AAE3C,yCAAwC;AACxC,yDAAwD;AACxD,iCAAgC;AAChC,sEAA2E;AAC3E,qCAAiD;AA4CjD,SAAgB,GAAG;IAAC,cAAkB;SAAlB,UAAkB,EAAlB,qBAAkB,EAAlB,IAAkB;QAAlB,yBAAkB;;IACpC,IAAM,cAAc,GAAG,wBAAiB,CAAC,IAAI,CAAC,CAAC;IAE/C,IAAM,OAAO,GAAG,+BAAc,CAAC,IAAI,CAA0B,CAAC;IAE9D,OAAO,OAAO,CAAC,MAAM;QACnB,CAAC,CAAC,IAAI,uBAAU,CAAY,UAAC,UAAU;YAGnC,IAAI,OAAO,GAAgB,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,EAAE,EAAF,CAAE,CAAC,CAAC;YAKjD,IAAI,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,cAAM,OAAA,KAAK,EAAL,CAAK,CAAC,CAAC;YAGzC,UAAU,CAAC,GAAG,CAAC;gBACb,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC,CAAC;oCAKM,WAAW;gBAClB,qBAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACvC,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;oBACJ,OAAO,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAIjC,IAAI,OAAO,CAAC,KAAK,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,MAAM,EAAb,CAAa,CAAC,EAAE;wBAC5C,IAAM,MAAM,GAAQ,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,MAAM,CAAC,KAAK,EAAG,EAAf,CAAe,CAAC,CAAC;wBAE7D,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,wCAAI,MAAM,IAAE,CAAC,CAAC,MAAM,CAAC,CAAC;wBAIrE,IAAI,OAAO,CAAC,IAAI,CAAC,UAAC,MAAM,EAAE,CAAC,IAAK,OAAA,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,EAA9B,CAA8B,CAAC,EAAE;4BAC/D,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;qBACF;gBACH,CAAC,EACD;oBAGE,SAAS,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;oBAI9B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxD,CAAC,CACF,CACF,CAAC;;YA/BJ,KAAK,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,IAAI,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE;wBAAlF,WAAW;aAgCnB;YAGD,OAAO;gBACL,OAAO,GAAG,SAAS,GAAG,IAAK,CAAC;YAC9B,CAAC,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC,CAAC,aAAK,CAAC;AACZ,CAAC;AAhED,kBAgEC"}
|
||||
@@ -0,0 +1,4 @@
|
||||
export function tap(value, mutator) {
|
||||
mutator(value)
|
||||
return value
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import type {BuiltIns, HasMultipleCallSignatures} from './internal';
|
||||
|
||||
/**
|
||||
Convert `object`s, `Map`s, `Set`s, and `Array`s and all of their keys/elements into immutable structures recursively.
|
||||
|
||||
This is useful when a deeply nested structure needs to be exposed as completely immutable, for example, an imported JSON module or when receiving an API response that is passed around.
|
||||
|
||||
Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/13923) if you want to have this type as a built-in in TypeScript.
|
||||
|
||||
@example
|
||||
```
|
||||
// data.json
|
||||
{
|
||||
"foo": ["bar"]
|
||||
}
|
||||
|
||||
// main.ts
|
||||
import type {ReadonlyDeep} from 'type-fest';
|
||||
import dataJson = require('./data.json');
|
||||
|
||||
const data: ReadonlyDeep<typeof dataJson> = dataJson;
|
||||
|
||||
export default data;
|
||||
|
||||
// test.ts
|
||||
import data from './main';
|
||||
|
||||
data.foo.push('bar');
|
||||
//=> error TS2339: Property 'push' does not exist on type 'readonly string[]'
|
||||
```
|
||||
|
||||
Note that types containing overloaded functions are not made deeply readonly due to a [TypeScript limitation](https://github.com/microsoft/TypeScript/issues/29732).
|
||||
|
||||
@category Object
|
||||
@category Array
|
||||
@category Set
|
||||
@category Map
|
||||
*/
|
||||
export type ReadonlyDeep<T> = T extends BuiltIns
|
||||
? T
|
||||
: T extends (...arguments: any[]) => unknown
|
||||
? {} extends ReadonlyObjectDeep<T>
|
||||
? T
|
||||
: HasMultipleCallSignatures<T> extends true
|
||||
? T
|
||||
: ((...arguments: Parameters<T>) => ReturnType<T>) & ReadonlyObjectDeep<T>
|
||||
: T extends Readonly<ReadonlyMap<infer KeyType, infer ValueType>>
|
||||
? ReadonlyMapDeep<KeyType, ValueType>
|
||||
: T extends Readonly<ReadonlySet<infer ItemType>>
|
||||
? ReadonlySetDeep<ItemType>
|
||||
: T extends object
|
||||
? ReadonlyObjectDeep<T>
|
||||
: unknown;
|
||||
|
||||
/**
|
||||
Same as `ReadonlyDeep`, but accepts only `ReadonlyMap`s as inputs. Internal helper for `ReadonlyDeep`.
|
||||
*/
|
||||
type ReadonlyMapDeep<KeyType, ValueType> = {} & Readonly<ReadonlyMap<ReadonlyDeep<KeyType>, ReadonlyDeep<ValueType>>>;
|
||||
|
||||
/**
|
||||
Same as `ReadonlyDeep`, but accepts only `ReadonlySet`s as inputs. Internal helper for `ReadonlyDeep`.
|
||||
*/
|
||||
type ReadonlySetDeep<ItemType> = {} & Readonly<ReadonlySet<ReadonlyDeep<ItemType>>>;
|
||||
|
||||
/**
|
||||
Same as `ReadonlyDeep`, but accepts only `object`s as inputs. Internal helper for `ReadonlyDeep`.
|
||||
*/
|
||||
type ReadonlyObjectDeep<ObjectType extends object> = {
|
||||
readonly [KeyType in keyof ObjectType]: ReadonlyDeep<ObjectType[KeyType]>
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "10"
|
||||
- "8"
|
||||
- "6"
|
||||
after_success: 'npm run coveralls'
|
||||
script: "npm run travis"
|
||||
@@ -0,0 +1,106 @@
|
||||
var defaultIsMergeableObject = require('is-mergeable-object')
|
||||
|
||||
function emptyTarget(val) {
|
||||
return Array.isArray(val) ? [] : {}
|
||||
}
|
||||
|
||||
function cloneUnlessOtherwiseSpecified(value, options) {
|
||||
return (options.clone !== false && options.isMergeableObject(value))
|
||||
? deepmerge(emptyTarget(value), value, options)
|
||||
: value
|
||||
}
|
||||
|
||||
function defaultArrayMerge(target, source, options) {
|
||||
return target.concat(source).map(function(element) {
|
||||
return cloneUnlessOtherwiseSpecified(element, options)
|
||||
})
|
||||
}
|
||||
|
||||
function getMergeFunction(key, options) {
|
||||
if (!options.customMerge) {
|
||||
return deepmerge
|
||||
}
|
||||
var customMerge = options.customMerge(key)
|
||||
return typeof customMerge === 'function' ? customMerge : deepmerge
|
||||
}
|
||||
|
||||
function getEnumerableOwnPropertySymbols(target) {
|
||||
return Object.getOwnPropertySymbols
|
||||
? Object.getOwnPropertySymbols(target).filter(function(symbol) {
|
||||
return Object.propertyIsEnumerable.call(target, symbol)
|
||||
})
|
||||
: []
|
||||
}
|
||||
|
||||
function getKeys(target) {
|
||||
return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
|
||||
}
|
||||
|
||||
function propertyIsOnObject(object, property) {
|
||||
try {
|
||||
return property in object
|
||||
} catch(_) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// Protects from prototype poisoning and unexpected merging up the prototype chain.
|
||||
function propertyIsUnsafe(target, key) {
|
||||
return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
|
||||
&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
|
||||
&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
|
||||
}
|
||||
|
||||
function mergeObject(target, source, options) {
|
||||
var destination = {}
|
||||
if (options.isMergeableObject(target)) {
|
||||
getKeys(target).forEach(function(key) {
|
||||
destination[key] = cloneUnlessOtherwiseSpecified(target[key], options)
|
||||
})
|
||||
}
|
||||
getKeys(source).forEach(function(key) {
|
||||
if (propertyIsUnsafe(target, key)) {
|
||||
return
|
||||
}
|
||||
|
||||
if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
|
||||
destination[key] = getMergeFunction(key, options)(target[key], source[key], options)
|
||||
} else {
|
||||
destination[key] = cloneUnlessOtherwiseSpecified(source[key], options)
|
||||
}
|
||||
})
|
||||
return destination
|
||||
}
|
||||
|
||||
function deepmerge(target, source, options) {
|
||||
options = options || {}
|
||||
options.arrayMerge = options.arrayMerge || defaultArrayMerge
|
||||
options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject
|
||||
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
|
||||
// implementations can use it. The caller may not replace it.
|
||||
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified
|
||||
|
||||
var sourceIsArray = Array.isArray(source)
|
||||
var targetIsArray = Array.isArray(target)
|
||||
var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray
|
||||
|
||||
if (!sourceAndTargetTypesMatch) {
|
||||
return cloneUnlessOtherwiseSpecified(source, options)
|
||||
} else if (sourceIsArray) {
|
||||
return options.arrayMerge(target, source, options)
|
||||
} else {
|
||||
return mergeObject(target, source, options)
|
||||
}
|
||||
}
|
||||
|
||||
deepmerge.all = function deepmergeAll(array, options) {
|
||||
if (!Array.isArray(array)) {
|
||||
throw new Error('first argument should be an array')
|
||||
}
|
||||
|
||||
return array.reduce(function(prev, next) {
|
||||
return deepmerge(prev, next, options)
|
||||
}, {})
|
||||
}
|
||||
|
||||
module.exports = deepmerge
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"skipUntil.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skipUntil.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,GAAG,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAiBxF"}
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Octokit } from "@octokit/core";
|
||||
export { RestEndpointMethodTypes } from "./generated/parameters-and-response-types";
|
||||
import { Api } from "./types";
|
||||
export declare function restEndpointMethods(octokit: Octokit): Api;
|
||||
export declare namespace restEndpointMethods {
|
||||
var VERSION: string;
|
||||
}
|
||||
export declare function legacyRestEndpointMethods(octokit: Octokit): Api["rest"] & Api;
|
||||
export declare namespace legacyRestEndpointMethods {
|
||||
var VERSION: string;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
var baseGt = require('./_baseGt'),
|
||||
createRelationalOperation = require('./_createRelationalOperation');
|
||||
|
||||
/**
|
||||
* Checks if `value` is greater than `other`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.9.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to compare.
|
||||
* @param {*} other The other value to compare.
|
||||
* @returns {boolean} Returns `true` if `value` is greater than `other`,
|
||||
* else `false`.
|
||||
* @see _.lt
|
||||
* @example
|
||||
*
|
||||
* _.gt(3, 1);
|
||||
* // => true
|
||||
*
|
||||
* _.gt(3, 3);
|
||||
* // => false
|
||||
*
|
||||
* _.gt(1, 3);
|
||||
* // => false
|
||||
*/
|
||||
var gt = createRelationalOperation(baseGt);
|
||||
|
||||
module.exports = gt;
|
||||
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
|
||||
|
||||
function highWaterMarkFrom(options, isDuplex, duplexKey) {
|
||||
return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
|
||||
}
|
||||
|
||||
function getHighWaterMark(state, options, duplexKey, isDuplex) {
|
||||
var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
|
||||
|
||||
if (hwm != null) {
|
||||
if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
|
||||
var name = isDuplex ? duplexKey : 'highWaterMark';
|
||||
throw new ERR_INVALID_OPT_VALUE(name, hwm);
|
||||
}
|
||||
|
||||
return Math.floor(hwm);
|
||||
} // Default value
|
||||
|
||||
|
||||
return state.objectMode ? 16 : 16 * 1024;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getHighWaterMark: getHighWaterMark
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
export { default as compile } from './compile/index';
|
||||
export { default as parse } from './parse/index';
|
||||
export { default as preprocess } from './preprocess/index';
|
||||
export { walk } from 'estree-walker';
|
||||
export declare const VERSION = "__VERSION__";
|
||||
|
||||
export { CompileOptions, ModuleFormat, EnableSourcemap, CssHashGetter } from "./interfaces"
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, ensureString = require("../../string/ensure");
|
||||
|
||||
describe("string/ensure", function () {
|
||||
it("Should return coerced value", function () { assert.equal(ensureString(12), "12"); });
|
||||
it("Should crash on no value", function () {
|
||||
try {
|
||||
ensureString(null);
|
||||
throw new Error("Unexpected");
|
||||
} catch (error) {
|
||||
assert.equal(error.name, "TypeError");
|
||||
assert.equal(error.message, "null is not a string");
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,6 @@
|
||||
export declare type Fork = {
|
||||
use<T>(plugin: Plugin<T>): T;
|
||||
};
|
||||
export declare type Plugin<T> = (fork: Fork) => T;
|
||||
export declare type Def = Plugin<void>;
|
||||
export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('sampleSize', require('../sampleSize'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,42 @@
|
||||
var wrappy = require('wrappy')
|
||||
module.exports = wrappy(once)
|
||||
module.exports.strict = wrappy(onceStrict)
|
||||
|
||||
once.proto = once(function () {
|
||||
Object.defineProperty(Function.prototype, 'once', {
|
||||
value: function () {
|
||||
return once(this)
|
||||
},
|
||||
configurable: true
|
||||
})
|
||||
|
||||
Object.defineProperty(Function.prototype, 'onceStrict', {
|
||||
value: function () {
|
||||
return onceStrict(this)
|
||||
},
|
||||
configurable: true
|
||||
})
|
||||
})
|
||||
|
||||
function once (fn) {
|
||||
var f = function () {
|
||||
if (f.called) return f.value
|
||||
f.called = true
|
||||
return f.value = fn.apply(this, arguments)
|
||||
}
|
||||
f.called = false
|
||||
return f
|
||||
}
|
||||
|
||||
function onceStrict (fn) {
|
||||
var f = function () {
|
||||
if (f.called)
|
||||
throw new Error(f.onceError)
|
||||
f.called = true
|
||||
return f.value = fn.apply(this, arguments)
|
||||
}
|
||||
var name = fn.name || 'Function wrapped with `once`'
|
||||
f.onceError = name + " shouldn't be called more than once"
|
||||
f.called = false
|
||||
return f
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.mergeAll = exports.merge = exports.max = exports.materialize = exports.mapTo = exports.map = exports.last = exports.isEmpty = exports.ignoreElements = exports.groupBy = exports.first = exports.findIndex = exports.find = exports.finalize = exports.filter = exports.expand = exports.exhaustMap = exports.exhaustAll = exports.exhaust = exports.every = exports.endWith = exports.elementAt = exports.distinctUntilKeyChanged = exports.distinctUntilChanged = exports.distinct = exports.dematerialize = exports.delayWhen = exports.delay = exports.defaultIfEmpty = exports.debounceTime = exports.debounce = exports.count = exports.connect = exports.concatWith = exports.concatMapTo = exports.concatMap = exports.concatAll = exports.concat = exports.combineLatestWith = exports.combineLatest = exports.combineLatestAll = exports.combineAll = exports.catchError = exports.bufferWhen = exports.bufferToggle = exports.bufferTime = exports.bufferCount = exports.buffer = exports.auditTime = exports.audit = void 0;
|
||||
exports.timeInterval = exports.throwIfEmpty = exports.throttleTime = exports.throttle = exports.tap = exports.takeWhile = exports.takeUntil = exports.takeLast = exports.take = exports.switchScan = exports.switchMapTo = exports.switchMap = exports.switchAll = exports.subscribeOn = exports.startWith = exports.skipWhile = exports.skipUntil = exports.skipLast = exports.skip = exports.single = exports.shareReplay = exports.share = exports.sequenceEqual = exports.scan = exports.sampleTime = exports.sample = exports.refCount = exports.retryWhen = exports.retry = exports.repeatWhen = exports.repeat = exports.reduce = exports.raceWith = exports.race = exports.publishReplay = exports.publishLast = exports.publishBehavior = exports.publish = exports.pluck = exports.partition = exports.pairwise = exports.onErrorResumeNext = exports.observeOn = exports.multicast = exports.min = exports.mergeWith = exports.mergeScan = exports.mergeMapTo = exports.mergeMap = exports.flatMap = void 0;
|
||||
exports.zipWith = exports.zipAll = exports.zip = exports.withLatestFrom = exports.windowWhen = exports.windowToggle = exports.windowTime = exports.windowCount = exports.window = exports.toArray = exports.timestamp = exports.timeoutWith = exports.timeout = void 0;
|
||||
var audit_1 = require("../internal/operators/audit");
|
||||
Object.defineProperty(exports, "audit", { enumerable: true, get: function () { return audit_1.audit; } });
|
||||
var auditTime_1 = require("../internal/operators/auditTime");
|
||||
Object.defineProperty(exports, "auditTime", { enumerable: true, get: function () { return auditTime_1.auditTime; } });
|
||||
var buffer_1 = require("../internal/operators/buffer");
|
||||
Object.defineProperty(exports, "buffer", { enumerable: true, get: function () { return buffer_1.buffer; } });
|
||||
var bufferCount_1 = require("../internal/operators/bufferCount");
|
||||
Object.defineProperty(exports, "bufferCount", { enumerable: true, get: function () { return bufferCount_1.bufferCount; } });
|
||||
var bufferTime_1 = require("../internal/operators/bufferTime");
|
||||
Object.defineProperty(exports, "bufferTime", { enumerable: true, get: function () { return bufferTime_1.bufferTime; } });
|
||||
var bufferToggle_1 = require("../internal/operators/bufferToggle");
|
||||
Object.defineProperty(exports, "bufferToggle", { enumerable: true, get: function () { return bufferToggle_1.bufferToggle; } });
|
||||
var bufferWhen_1 = require("../internal/operators/bufferWhen");
|
||||
Object.defineProperty(exports, "bufferWhen", { enumerable: true, get: function () { return bufferWhen_1.bufferWhen; } });
|
||||
var catchError_1 = require("../internal/operators/catchError");
|
||||
Object.defineProperty(exports, "catchError", { enumerable: true, get: function () { return catchError_1.catchError; } });
|
||||
var combineAll_1 = require("../internal/operators/combineAll");
|
||||
Object.defineProperty(exports, "combineAll", { enumerable: true, get: function () { return combineAll_1.combineAll; } });
|
||||
var combineLatestAll_1 = require("../internal/operators/combineLatestAll");
|
||||
Object.defineProperty(exports, "combineLatestAll", { enumerable: true, get: function () { return combineLatestAll_1.combineLatestAll; } });
|
||||
var combineLatest_1 = require("../internal/operators/combineLatest");
|
||||
Object.defineProperty(exports, "combineLatest", { enumerable: true, get: function () { return combineLatest_1.combineLatest; } });
|
||||
var combineLatestWith_1 = require("../internal/operators/combineLatestWith");
|
||||
Object.defineProperty(exports, "combineLatestWith", { enumerable: true, get: function () { return combineLatestWith_1.combineLatestWith; } });
|
||||
var concat_1 = require("../internal/operators/concat");
|
||||
Object.defineProperty(exports, "concat", { enumerable: true, get: function () { return concat_1.concat; } });
|
||||
var concatAll_1 = require("../internal/operators/concatAll");
|
||||
Object.defineProperty(exports, "concatAll", { enumerable: true, get: function () { return concatAll_1.concatAll; } });
|
||||
var concatMap_1 = require("../internal/operators/concatMap");
|
||||
Object.defineProperty(exports, "concatMap", { enumerable: true, get: function () { return concatMap_1.concatMap; } });
|
||||
var concatMapTo_1 = require("../internal/operators/concatMapTo");
|
||||
Object.defineProperty(exports, "concatMapTo", { enumerable: true, get: function () { return concatMapTo_1.concatMapTo; } });
|
||||
var concatWith_1 = require("../internal/operators/concatWith");
|
||||
Object.defineProperty(exports, "concatWith", { enumerable: true, get: function () { return concatWith_1.concatWith; } });
|
||||
var connect_1 = require("../internal/operators/connect");
|
||||
Object.defineProperty(exports, "connect", { enumerable: true, get: function () { return connect_1.connect; } });
|
||||
var count_1 = require("../internal/operators/count");
|
||||
Object.defineProperty(exports, "count", { enumerable: true, get: function () { return count_1.count; } });
|
||||
var debounce_1 = require("../internal/operators/debounce");
|
||||
Object.defineProperty(exports, "debounce", { enumerable: true, get: function () { return debounce_1.debounce; } });
|
||||
var debounceTime_1 = require("../internal/operators/debounceTime");
|
||||
Object.defineProperty(exports, "debounceTime", { enumerable: true, get: function () { return debounceTime_1.debounceTime; } });
|
||||
var defaultIfEmpty_1 = require("../internal/operators/defaultIfEmpty");
|
||||
Object.defineProperty(exports, "defaultIfEmpty", { enumerable: true, get: function () { return defaultIfEmpty_1.defaultIfEmpty; } });
|
||||
var delay_1 = require("../internal/operators/delay");
|
||||
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return delay_1.delay; } });
|
||||
var delayWhen_1 = require("../internal/operators/delayWhen");
|
||||
Object.defineProperty(exports, "delayWhen", { enumerable: true, get: function () { return delayWhen_1.delayWhen; } });
|
||||
var dematerialize_1 = require("../internal/operators/dematerialize");
|
||||
Object.defineProperty(exports, "dematerialize", { enumerable: true, get: function () { return dematerialize_1.dematerialize; } });
|
||||
var distinct_1 = require("../internal/operators/distinct");
|
||||
Object.defineProperty(exports, "distinct", { enumerable: true, get: function () { return distinct_1.distinct; } });
|
||||
var distinctUntilChanged_1 = require("../internal/operators/distinctUntilChanged");
|
||||
Object.defineProperty(exports, "distinctUntilChanged", { enumerable: true, get: function () { return distinctUntilChanged_1.distinctUntilChanged; } });
|
||||
var distinctUntilKeyChanged_1 = require("../internal/operators/distinctUntilKeyChanged");
|
||||
Object.defineProperty(exports, "distinctUntilKeyChanged", { enumerable: true, get: function () { return distinctUntilKeyChanged_1.distinctUntilKeyChanged; } });
|
||||
var elementAt_1 = require("../internal/operators/elementAt");
|
||||
Object.defineProperty(exports, "elementAt", { enumerable: true, get: function () { return elementAt_1.elementAt; } });
|
||||
var endWith_1 = require("../internal/operators/endWith");
|
||||
Object.defineProperty(exports, "endWith", { enumerable: true, get: function () { return endWith_1.endWith; } });
|
||||
var every_1 = require("../internal/operators/every");
|
||||
Object.defineProperty(exports, "every", { enumerable: true, get: function () { return every_1.every; } });
|
||||
var exhaust_1 = require("../internal/operators/exhaust");
|
||||
Object.defineProperty(exports, "exhaust", { enumerable: true, get: function () { return exhaust_1.exhaust; } });
|
||||
var exhaustAll_1 = require("../internal/operators/exhaustAll");
|
||||
Object.defineProperty(exports, "exhaustAll", { enumerable: true, get: function () { return exhaustAll_1.exhaustAll; } });
|
||||
var exhaustMap_1 = require("../internal/operators/exhaustMap");
|
||||
Object.defineProperty(exports, "exhaustMap", { enumerable: true, get: function () { return exhaustMap_1.exhaustMap; } });
|
||||
var expand_1 = require("../internal/operators/expand");
|
||||
Object.defineProperty(exports, "expand", { enumerable: true, get: function () { return expand_1.expand; } });
|
||||
var filter_1 = require("../internal/operators/filter");
|
||||
Object.defineProperty(exports, "filter", { enumerable: true, get: function () { return filter_1.filter; } });
|
||||
var finalize_1 = require("../internal/operators/finalize");
|
||||
Object.defineProperty(exports, "finalize", { enumerable: true, get: function () { return finalize_1.finalize; } });
|
||||
var find_1 = require("../internal/operators/find");
|
||||
Object.defineProperty(exports, "find", { enumerable: true, get: function () { return find_1.find; } });
|
||||
var findIndex_1 = require("../internal/operators/findIndex");
|
||||
Object.defineProperty(exports, "findIndex", { enumerable: true, get: function () { return findIndex_1.findIndex; } });
|
||||
var first_1 = require("../internal/operators/first");
|
||||
Object.defineProperty(exports, "first", { enumerable: true, get: function () { return first_1.first; } });
|
||||
var groupBy_1 = require("../internal/operators/groupBy");
|
||||
Object.defineProperty(exports, "groupBy", { enumerable: true, get: function () { return groupBy_1.groupBy; } });
|
||||
var ignoreElements_1 = require("../internal/operators/ignoreElements");
|
||||
Object.defineProperty(exports, "ignoreElements", { enumerable: true, get: function () { return ignoreElements_1.ignoreElements; } });
|
||||
var isEmpty_1 = require("../internal/operators/isEmpty");
|
||||
Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return isEmpty_1.isEmpty; } });
|
||||
var last_1 = require("../internal/operators/last");
|
||||
Object.defineProperty(exports, "last", { enumerable: true, get: function () { return last_1.last; } });
|
||||
var map_1 = require("../internal/operators/map");
|
||||
Object.defineProperty(exports, "map", { enumerable: true, get: function () { return map_1.map; } });
|
||||
var mapTo_1 = require("../internal/operators/mapTo");
|
||||
Object.defineProperty(exports, "mapTo", { enumerable: true, get: function () { return mapTo_1.mapTo; } });
|
||||
var materialize_1 = require("../internal/operators/materialize");
|
||||
Object.defineProperty(exports, "materialize", { enumerable: true, get: function () { return materialize_1.materialize; } });
|
||||
var max_1 = require("../internal/operators/max");
|
||||
Object.defineProperty(exports, "max", { enumerable: true, get: function () { return max_1.max; } });
|
||||
var merge_1 = require("../internal/operators/merge");
|
||||
Object.defineProperty(exports, "merge", { enumerable: true, get: function () { return merge_1.merge; } });
|
||||
var mergeAll_1 = require("../internal/operators/mergeAll");
|
||||
Object.defineProperty(exports, "mergeAll", { enumerable: true, get: function () { return mergeAll_1.mergeAll; } });
|
||||
var flatMap_1 = require("../internal/operators/flatMap");
|
||||
Object.defineProperty(exports, "flatMap", { enumerable: true, get: function () { return flatMap_1.flatMap; } });
|
||||
var mergeMap_1 = require("../internal/operators/mergeMap");
|
||||
Object.defineProperty(exports, "mergeMap", { enumerable: true, get: function () { return mergeMap_1.mergeMap; } });
|
||||
var mergeMapTo_1 = require("../internal/operators/mergeMapTo");
|
||||
Object.defineProperty(exports, "mergeMapTo", { enumerable: true, get: function () { return mergeMapTo_1.mergeMapTo; } });
|
||||
var mergeScan_1 = require("../internal/operators/mergeScan");
|
||||
Object.defineProperty(exports, "mergeScan", { enumerable: true, get: function () { return mergeScan_1.mergeScan; } });
|
||||
var mergeWith_1 = require("../internal/operators/mergeWith");
|
||||
Object.defineProperty(exports, "mergeWith", { enumerable: true, get: function () { return mergeWith_1.mergeWith; } });
|
||||
var min_1 = require("../internal/operators/min");
|
||||
Object.defineProperty(exports, "min", { enumerable: true, get: function () { return min_1.min; } });
|
||||
var multicast_1 = require("../internal/operators/multicast");
|
||||
Object.defineProperty(exports, "multicast", { enumerable: true, get: function () { return multicast_1.multicast; } });
|
||||
var observeOn_1 = require("../internal/operators/observeOn");
|
||||
Object.defineProperty(exports, "observeOn", { enumerable: true, get: function () { return observeOn_1.observeOn; } });
|
||||
var onErrorResumeNextWith_1 = require("../internal/operators/onErrorResumeNextWith");
|
||||
Object.defineProperty(exports, "onErrorResumeNext", { enumerable: true, get: function () { return onErrorResumeNextWith_1.onErrorResumeNext; } });
|
||||
var pairwise_1 = require("../internal/operators/pairwise");
|
||||
Object.defineProperty(exports, "pairwise", { enumerable: true, get: function () { return pairwise_1.pairwise; } });
|
||||
var partition_1 = require("../internal/operators/partition");
|
||||
Object.defineProperty(exports, "partition", { enumerable: true, get: function () { return partition_1.partition; } });
|
||||
var pluck_1 = require("../internal/operators/pluck");
|
||||
Object.defineProperty(exports, "pluck", { enumerable: true, get: function () { return pluck_1.pluck; } });
|
||||
var publish_1 = require("../internal/operators/publish");
|
||||
Object.defineProperty(exports, "publish", { enumerable: true, get: function () { return publish_1.publish; } });
|
||||
var publishBehavior_1 = require("../internal/operators/publishBehavior");
|
||||
Object.defineProperty(exports, "publishBehavior", { enumerable: true, get: function () { return publishBehavior_1.publishBehavior; } });
|
||||
var publishLast_1 = require("../internal/operators/publishLast");
|
||||
Object.defineProperty(exports, "publishLast", { enumerable: true, get: function () { return publishLast_1.publishLast; } });
|
||||
var publishReplay_1 = require("../internal/operators/publishReplay");
|
||||
Object.defineProperty(exports, "publishReplay", { enumerable: true, get: function () { return publishReplay_1.publishReplay; } });
|
||||
var race_1 = require("../internal/operators/race");
|
||||
Object.defineProperty(exports, "race", { enumerable: true, get: function () { return race_1.race; } });
|
||||
var raceWith_1 = require("../internal/operators/raceWith");
|
||||
Object.defineProperty(exports, "raceWith", { enumerable: true, get: function () { return raceWith_1.raceWith; } });
|
||||
var reduce_1 = require("../internal/operators/reduce");
|
||||
Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_1.reduce; } });
|
||||
var repeat_1 = require("../internal/operators/repeat");
|
||||
Object.defineProperty(exports, "repeat", { enumerable: true, get: function () { return repeat_1.repeat; } });
|
||||
var repeatWhen_1 = require("../internal/operators/repeatWhen");
|
||||
Object.defineProperty(exports, "repeatWhen", { enumerable: true, get: function () { return repeatWhen_1.repeatWhen; } });
|
||||
var retry_1 = require("../internal/operators/retry");
|
||||
Object.defineProperty(exports, "retry", { enumerable: true, get: function () { return retry_1.retry; } });
|
||||
var retryWhen_1 = require("../internal/operators/retryWhen");
|
||||
Object.defineProperty(exports, "retryWhen", { enumerable: true, get: function () { return retryWhen_1.retryWhen; } });
|
||||
var refCount_1 = require("../internal/operators/refCount");
|
||||
Object.defineProperty(exports, "refCount", { enumerable: true, get: function () { return refCount_1.refCount; } });
|
||||
var sample_1 = require("../internal/operators/sample");
|
||||
Object.defineProperty(exports, "sample", { enumerable: true, get: function () { return sample_1.sample; } });
|
||||
var sampleTime_1 = require("../internal/operators/sampleTime");
|
||||
Object.defineProperty(exports, "sampleTime", { enumerable: true, get: function () { return sampleTime_1.sampleTime; } });
|
||||
var scan_1 = require("../internal/operators/scan");
|
||||
Object.defineProperty(exports, "scan", { enumerable: true, get: function () { return scan_1.scan; } });
|
||||
var sequenceEqual_1 = require("../internal/operators/sequenceEqual");
|
||||
Object.defineProperty(exports, "sequenceEqual", { enumerable: true, get: function () { return sequenceEqual_1.sequenceEqual; } });
|
||||
var share_1 = require("../internal/operators/share");
|
||||
Object.defineProperty(exports, "share", { enumerable: true, get: function () { return share_1.share; } });
|
||||
var shareReplay_1 = require("../internal/operators/shareReplay");
|
||||
Object.defineProperty(exports, "shareReplay", { enumerable: true, get: function () { return shareReplay_1.shareReplay; } });
|
||||
var single_1 = require("../internal/operators/single");
|
||||
Object.defineProperty(exports, "single", { enumerable: true, get: function () { return single_1.single; } });
|
||||
var skip_1 = require("../internal/operators/skip");
|
||||
Object.defineProperty(exports, "skip", { enumerable: true, get: function () { return skip_1.skip; } });
|
||||
var skipLast_1 = require("../internal/operators/skipLast");
|
||||
Object.defineProperty(exports, "skipLast", { enumerable: true, get: function () { return skipLast_1.skipLast; } });
|
||||
var skipUntil_1 = require("../internal/operators/skipUntil");
|
||||
Object.defineProperty(exports, "skipUntil", { enumerable: true, get: function () { return skipUntil_1.skipUntil; } });
|
||||
var skipWhile_1 = require("../internal/operators/skipWhile");
|
||||
Object.defineProperty(exports, "skipWhile", { enumerable: true, get: function () { return skipWhile_1.skipWhile; } });
|
||||
var startWith_1 = require("../internal/operators/startWith");
|
||||
Object.defineProperty(exports, "startWith", { enumerable: true, get: function () { return startWith_1.startWith; } });
|
||||
var subscribeOn_1 = require("../internal/operators/subscribeOn");
|
||||
Object.defineProperty(exports, "subscribeOn", { enumerable: true, get: function () { return subscribeOn_1.subscribeOn; } });
|
||||
var switchAll_1 = require("../internal/operators/switchAll");
|
||||
Object.defineProperty(exports, "switchAll", { enumerable: true, get: function () { return switchAll_1.switchAll; } });
|
||||
var switchMap_1 = require("../internal/operators/switchMap");
|
||||
Object.defineProperty(exports, "switchMap", { enumerable: true, get: function () { return switchMap_1.switchMap; } });
|
||||
var switchMapTo_1 = require("../internal/operators/switchMapTo");
|
||||
Object.defineProperty(exports, "switchMapTo", { enumerable: true, get: function () { return switchMapTo_1.switchMapTo; } });
|
||||
var switchScan_1 = require("../internal/operators/switchScan");
|
||||
Object.defineProperty(exports, "switchScan", { enumerable: true, get: function () { return switchScan_1.switchScan; } });
|
||||
var take_1 = require("../internal/operators/take");
|
||||
Object.defineProperty(exports, "take", { enumerable: true, get: function () { return take_1.take; } });
|
||||
var takeLast_1 = require("../internal/operators/takeLast");
|
||||
Object.defineProperty(exports, "takeLast", { enumerable: true, get: function () { return takeLast_1.takeLast; } });
|
||||
var takeUntil_1 = require("../internal/operators/takeUntil");
|
||||
Object.defineProperty(exports, "takeUntil", { enumerable: true, get: function () { return takeUntil_1.takeUntil; } });
|
||||
var takeWhile_1 = require("../internal/operators/takeWhile");
|
||||
Object.defineProperty(exports, "takeWhile", { enumerable: true, get: function () { return takeWhile_1.takeWhile; } });
|
||||
var tap_1 = require("../internal/operators/tap");
|
||||
Object.defineProperty(exports, "tap", { enumerable: true, get: function () { return tap_1.tap; } });
|
||||
var throttle_1 = require("../internal/operators/throttle");
|
||||
Object.defineProperty(exports, "throttle", { enumerable: true, get: function () { return throttle_1.throttle; } });
|
||||
var throttleTime_1 = require("../internal/operators/throttleTime");
|
||||
Object.defineProperty(exports, "throttleTime", { enumerable: true, get: function () { return throttleTime_1.throttleTime; } });
|
||||
var throwIfEmpty_1 = require("../internal/operators/throwIfEmpty");
|
||||
Object.defineProperty(exports, "throwIfEmpty", { enumerable: true, get: function () { return throwIfEmpty_1.throwIfEmpty; } });
|
||||
var timeInterval_1 = require("../internal/operators/timeInterval");
|
||||
Object.defineProperty(exports, "timeInterval", { enumerable: true, get: function () { return timeInterval_1.timeInterval; } });
|
||||
var timeout_1 = require("../internal/operators/timeout");
|
||||
Object.defineProperty(exports, "timeout", { enumerable: true, get: function () { return timeout_1.timeout; } });
|
||||
var timeoutWith_1 = require("../internal/operators/timeoutWith");
|
||||
Object.defineProperty(exports, "timeoutWith", { enumerable: true, get: function () { return timeoutWith_1.timeoutWith; } });
|
||||
var timestamp_1 = require("../internal/operators/timestamp");
|
||||
Object.defineProperty(exports, "timestamp", { enumerable: true, get: function () { return timestamp_1.timestamp; } });
|
||||
var toArray_1 = require("../internal/operators/toArray");
|
||||
Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_1.toArray; } });
|
||||
var window_1 = require("../internal/operators/window");
|
||||
Object.defineProperty(exports, "window", { enumerable: true, get: function () { return window_1.window; } });
|
||||
var windowCount_1 = require("../internal/operators/windowCount");
|
||||
Object.defineProperty(exports, "windowCount", { enumerable: true, get: function () { return windowCount_1.windowCount; } });
|
||||
var windowTime_1 = require("../internal/operators/windowTime");
|
||||
Object.defineProperty(exports, "windowTime", { enumerable: true, get: function () { return windowTime_1.windowTime; } });
|
||||
var windowToggle_1 = require("../internal/operators/windowToggle");
|
||||
Object.defineProperty(exports, "windowToggle", { enumerable: true, get: function () { return windowToggle_1.windowToggle; } });
|
||||
var windowWhen_1 = require("../internal/operators/windowWhen");
|
||||
Object.defineProperty(exports, "windowWhen", { enumerable: true, get: function () { return windowWhen_1.windowWhen; } });
|
||||
var withLatestFrom_1 = require("../internal/operators/withLatestFrom");
|
||||
Object.defineProperty(exports, "withLatestFrom", { enumerable: true, get: function () { return withLatestFrom_1.withLatestFrom; } });
|
||||
var zip_1 = require("../internal/operators/zip");
|
||||
Object.defineProperty(exports, "zip", { enumerable: true, get: function () { return zip_1.zip; } });
|
||||
var zipAll_1 = require("../internal/operators/zipAll");
|
||||
Object.defineProperty(exports, "zipAll", { enumerable: true, get: function () { return zipAll_1.zipAll; } });
|
||||
var zipWith_1 = require("../internal/operators/zipWith");
|
||||
Object.defineProperty(exports, "zipWith", { enumerable: true, get: function () { return zipWith_1.zipWith; } });
|
||||
//# sourceMappingURL=index.js.map
|
||||
@@ -0,0 +1,110 @@
|
||||
var fs = require("fs");
|
||||
|
||||
exports.FILES = [
|
||||
require.resolve("../lib/utils.js"),
|
||||
require.resolve("../lib/ast.js"),
|
||||
require.resolve("../lib/transform.js"),
|
||||
require.resolve("../lib/parse.js"),
|
||||
require.resolve("../lib/scope.js"),
|
||||
require.resolve("../lib/compress.js"),
|
||||
require.resolve("../lib/output.js"),
|
||||
require.resolve("../lib/sourcemap.js"),
|
||||
require.resolve("../lib/mozilla-ast.js"),
|
||||
require.resolve("../lib/propmangle.js"),
|
||||
require.resolve("../lib/minify.js"),
|
||||
require.resolve("./exports.js"),
|
||||
];
|
||||
|
||||
new Function("domprops", "exports", function() {
|
||||
var code = exports.FILES.map(function(file) {
|
||||
return fs.readFileSync(file, "utf8");
|
||||
});
|
||||
code.push("exports.describe_ast = " + describe_ast.toString());
|
||||
return code.join("\n\n");
|
||||
}())(require("./domprops.json"), exports);
|
||||
|
||||
function to_comment(value) {
|
||||
if (typeof value != "string") value = JSON.stringify(value, function(key, value) {
|
||||
return typeof value == "function" ? "<[ " + value + " ]>" : value;
|
||||
}, 2);
|
||||
return "// " + value.replace(/\n/g, "\n// ");
|
||||
}
|
||||
|
||||
if (+process.env["UGLIFY_BUG_REPORT"]) exports.minify = function(files, options) {
|
||||
if (typeof options == "undefined") options = "<<undefined>>";
|
||||
var code = [
|
||||
"// UGLIFY_BUG_REPORT",
|
||||
to_comment(options),
|
||||
];
|
||||
if (typeof files == "string") {
|
||||
code.push("");
|
||||
code.push("//-------------------------------------------------------------")
|
||||
code.push("// INPUT CODE", files);
|
||||
} else for (var name in files) {
|
||||
code.push("");
|
||||
code.push("//-------------------------------------------------------------")
|
||||
code.push(to_comment(name), files[name]);
|
||||
}
|
||||
if (options.sourceMap && options.sourceMap.url) {
|
||||
code.push("");
|
||||
code.push("//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiJ9");
|
||||
}
|
||||
var result = { code: code.join("\n") };
|
||||
if (options.sourceMap) result.map = '{"version":3,"sources":[],"names":[],"mappings":""}';
|
||||
return result;
|
||||
};
|
||||
|
||||
function describe_ast() {
|
||||
var out = OutputStream({ beautify: true });
|
||||
doitem(AST_Node);
|
||||
return out.get() + "\n";
|
||||
|
||||
function doitem(ctor) {
|
||||
out.print("AST_" + ctor.TYPE);
|
||||
var props = ctor.SELF_PROPS.filter(function(prop) {
|
||||
return !/^\$/.test(prop);
|
||||
});
|
||||
if (props.length > 0) {
|
||||
out.space();
|
||||
out.with_parens(function() {
|
||||
props.forEach(function(prop, i) {
|
||||
if (i) out.space();
|
||||
out.print(prop);
|
||||
});
|
||||
});
|
||||
}
|
||||
if (ctor.documentation) {
|
||||
out.space();
|
||||
out.print_string(ctor.documentation);
|
||||
}
|
||||
if (ctor.SUBCLASSES.length > 0) {
|
||||
out.space();
|
||||
out.with_block(function() {
|
||||
ctor.SUBCLASSES.sort(function(a, b) {
|
||||
return a.TYPE < b.TYPE ? -1 : 1;
|
||||
}).forEach(function(ctor, i) {
|
||||
out.indent();
|
||||
doitem(ctor);
|
||||
out.newline();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function infer_options(options) {
|
||||
var result = exports.minify("", options);
|
||||
return result.error && result.error.defs;
|
||||
}
|
||||
|
||||
exports.default_options = function() {
|
||||
var defs = infer_options({ 0: 0 });
|
||||
Object.keys(defs).forEach(function(component) {
|
||||
var options = {};
|
||||
options[component] = { 0: 0 };
|
||||
if (options = infer_options(options)) {
|
||||
defs[component] = options;
|
||||
}
|
||||
});
|
||||
return defs;
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
var baseFlatten = require('./_baseFlatten'),
|
||||
baseRest = require('./_baseRest'),
|
||||
baseUniq = require('./_baseUniq'),
|
||||
isArrayLikeObject = require('./isArrayLikeObject');
|
||||
|
||||
/**
|
||||
* Creates an array of unique values, in order, from all given arrays using
|
||||
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
||||
* for equality comparisons.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Array
|
||||
* @param {...Array} [arrays] The arrays to inspect.
|
||||
* @returns {Array} Returns the new array of combined values.
|
||||
* @example
|
||||
*
|
||||
* _.union([2], [1, 2]);
|
||||
* // => [2, 1]
|
||||
*/
|
||||
var union = baseRest(function(arrays) {
|
||||
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
||||
});
|
||||
|
||||
module.exports = union;
|
||||
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var callBound = require('call-bind/callBound');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var IsArray = require('./IsArray');
|
||||
|
||||
var $apply = GetIntrinsic('%Reflect.apply%', true) || callBound('Function.prototype.apply');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-call
|
||||
|
||||
module.exports = function Call(F, V) {
|
||||
var argumentsList = arguments.length > 2 ? arguments[2] : [];
|
||||
if (!IsArray(argumentsList)) {
|
||||
throw new $TypeError('Assertion failed: optional `argumentsList`, if provided, must be a List');
|
||||
}
|
||||
return $apply(F, V, argumentsList);
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,176 @@
|
||||
import { SvelteComponent } from './Component';
|
||||
export declare function dispatch_dev<T = any>(type: string, detail?: T): void;
|
||||
export declare function append_dev(target: Node, node: Node): void;
|
||||
export declare function append_hydration_dev(target: Node, node: Node): void;
|
||||
export declare function insert_dev(target: Node, node: Node, anchor?: Node): void;
|
||||
export declare function insert_hydration_dev(target: Node, node: Node, anchor?: Node): void;
|
||||
export declare function detach_dev(node: Node): void;
|
||||
export declare function detach_between_dev(before: Node, after: Node): void;
|
||||
export declare function detach_before_dev(after: Node): void;
|
||||
export declare function detach_after_dev(before: Node): void;
|
||||
export declare function listen_dev(node: Node, event: string, handler: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions | EventListenerOptions, has_prevent_default?: boolean, has_stop_propagation?: boolean, has_stop_immediate_propagation?: boolean): () => void;
|
||||
export declare function attr_dev(node: Element, attribute: string, value?: string): void;
|
||||
export declare function prop_dev(node: Element, property: string, value?: any): void;
|
||||
export declare function dataset_dev(node: HTMLElement, property: string, value?: any): void;
|
||||
export declare function set_data_dev(text: any, data: any): void;
|
||||
export declare function validate_each_argument(arg: any): void;
|
||||
export declare function validate_slots(name: any, slot: any, keys: any): void;
|
||||
export declare function validate_dynamic_element(tag: unknown): void;
|
||||
export declare function validate_void_dynamic_element(tag: undefined | string): void;
|
||||
export declare function construct_svelte_component_dev(component: any, props: any): any;
|
||||
declare type Props = Record<string, any>;
|
||||
export interface SvelteComponentDev {
|
||||
$set(props?: Props): void;
|
||||
$on(event: string, callback: ((event: any) => void) | null | undefined): () => void;
|
||||
$destroy(): void;
|
||||
[accessor: string]: any;
|
||||
}
|
||||
export interface ComponentConstructorOptions<Props extends Record<string, any> = Record<string, any>> {
|
||||
target: Element | ShadowRoot;
|
||||
anchor?: Element;
|
||||
props?: Props;
|
||||
context?: Map<any, any>;
|
||||
hydrate?: boolean;
|
||||
intro?: boolean;
|
||||
$$inline?: boolean;
|
||||
}
|
||||
/**
|
||||
* Base class for Svelte components with some minor dev-enhancements. Used when dev=true.
|
||||
*/
|
||||
export declare class SvelteComponentDev extends SvelteComponent {
|
||||
/**
|
||||
* @private
|
||||
* For type checking capabilities only.
|
||||
* Does not exist at runtime.
|
||||
* ### DO NOT USE!
|
||||
*/
|
||||
$$prop_def: Props;
|
||||
/**
|
||||
* @private
|
||||
* For type checking capabilities only.
|
||||
* Does not exist at runtime.
|
||||
* ### DO NOT USE!
|
||||
*/
|
||||
$$events_def: any;
|
||||
/**
|
||||
* @private
|
||||
* For type checking capabilities only.
|
||||
* Does not exist at runtime.
|
||||
* ### DO NOT USE!
|
||||
*/
|
||||
$$slot_def: any;
|
||||
constructor(options: ComponentConstructorOptions);
|
||||
$capture_state(): void;
|
||||
$inject_state(): void;
|
||||
}
|
||||
export interface SvelteComponentTyped<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any> {
|
||||
$set(props?: Partial<Props>): void;
|
||||
$on<K extends Extract<keyof Events, string>>(type: K, callback: ((e: Events[K]) => void) | null | undefined): () => void;
|
||||
$destroy(): void;
|
||||
[accessor: string]: any;
|
||||
}
|
||||
/**
|
||||
* Base class to create strongly typed Svelte components.
|
||||
* This only exists for typing purposes and should be used in `.d.ts` files.
|
||||
*
|
||||
* ### Example:
|
||||
*
|
||||
* You have component library on npm called `component-library`, from which
|
||||
* you export a component called `MyComponent`. For Svelte+TypeScript users,
|
||||
* you want to provide typings. Therefore you create a `index.d.ts`:
|
||||
* ```ts
|
||||
* import { SvelteComponentTyped } from "svelte";
|
||||
* export class MyComponent extends SvelteComponentTyped<{foo: string}> {}
|
||||
* ```
|
||||
* Typing this makes it possible for IDEs like VS Code with the Svelte extension
|
||||
* to provide intellisense and to use the component like this in a Svelte file
|
||||
* with TypeScript:
|
||||
* ```svelte
|
||||
* <script lang="ts">
|
||||
* import { MyComponent } from "component-library";
|
||||
* </script>
|
||||
* <MyComponent foo={'bar'} />
|
||||
* ```
|
||||
*
|
||||
* #### Why not make this part of `SvelteComponent(Dev)`?
|
||||
* Because
|
||||
* ```ts
|
||||
* class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}
|
||||
* const component: typeof SvelteComponent = ASubclassOfSvelteComponent;
|
||||
* ```
|
||||
* will throw a type error, so we need to separate the more strictly typed class.
|
||||
*/
|
||||
export declare class SvelteComponentTyped<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any> extends SvelteComponentDev {
|
||||
/**
|
||||
* @private
|
||||
* For type checking capabilities only.
|
||||
* Does not exist at runtime.
|
||||
* ### DO NOT USE!
|
||||
*/
|
||||
$$prop_def: Props;
|
||||
/**
|
||||
* @private
|
||||
* For type checking capabilities only.
|
||||
* Does not exist at runtime.
|
||||
* ### DO NOT USE!
|
||||
*/
|
||||
$$events_def: Events;
|
||||
/**
|
||||
* @private
|
||||
* For type checking capabilities only.
|
||||
* Does not exist at runtime.
|
||||
* ### DO NOT USE!
|
||||
*/
|
||||
$$slot_def: Slots;
|
||||
constructor(options: ComponentConstructorOptions<Props>);
|
||||
}
|
||||
/**
|
||||
* Convenience type to get the type of a Svelte component. Useful for example in combination with
|
||||
* dynamic components using `<svelte:component>`.
|
||||
*
|
||||
* Example:
|
||||
* ```html
|
||||
* <script lang="ts">
|
||||
* import type { ComponentType, SvelteComponentTyped } from 'svelte';
|
||||
* import Component1 from './Component1.svelte';
|
||||
* import Component2 from './Component2.svelte';
|
||||
*
|
||||
* const component: ComponentType = someLogic() ? Component1 : Component2;
|
||||
* const componentOfCertainSubType: ComponentType<SvelteComponentTyped<{ needsThisProp: string }>> = someLogic() ? Component1 : Component2;
|
||||
* </script>
|
||||
*
|
||||
* <svelte:component this={component} />
|
||||
* <svelte:component this={componentOfCertainSubType} needsThisProp="hello" />
|
||||
* ```
|
||||
*/
|
||||
export declare type ComponentType<Component extends SvelteComponentTyped = SvelteComponentTyped> = new (options: ComponentConstructorOptions<Component extends SvelteComponentTyped<infer Props> ? Props : Record<string, any>>) => Component;
|
||||
/**
|
||||
* Convenience type to get the props the given component expects. Example:
|
||||
* ```html
|
||||
* <script lang="ts">
|
||||
* import type { ComponentProps } from 'svelte';
|
||||
* import Component from './Component.svelte';
|
||||
*
|
||||
* const props: ComponentProps<Component> = { foo: 'bar' }; // Errors if these aren't the correct props
|
||||
* </script>
|
||||
* ```
|
||||
*/
|
||||
export declare type ComponentProps<Component extends SvelteComponent> = Component extends SvelteComponentTyped<infer Props> ? Props : never;
|
||||
/**
|
||||
* Convenience type to get the events the given component expects. Example:
|
||||
* ```html
|
||||
* <script lang="ts">
|
||||
* import type { ComponentEvents } from 'svelte';
|
||||
* import Component from './Component.svelte';
|
||||
*
|
||||
* function handleCloseEvent(event: ComponentEvents<Component>['close']) {
|
||||
* console.log(event.detail);
|
||||
* }
|
||||
* </script>
|
||||
*
|
||||
* <Component on:close={handleCloseEvent} />
|
||||
* ```
|
||||
*/
|
||||
export declare type ComponentEvents<Component extends SvelteComponent> = Component extends SvelteComponentTyped<any, infer Events> ? Events : never;
|
||||
export declare function loop_guard(timeout: any): () => void;
|
||||
export {};
|
||||
@@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
|
||||
var exp = Math.exp;
|
||||
|
||||
module.exports = function (value) {
|
||||
var num1, num2;
|
||||
if (isNaN(value)) return NaN;
|
||||
value = Number(value);
|
||||
if (value === 0) return value;
|
||||
if (value === Infinity) return 1;
|
||||
if (value === -Infinity) return -1;
|
||||
num1 = exp(value);
|
||||
if (num1 === Infinity) return 1;
|
||||
num2 = exp(-value);
|
||||
if (num2 === Infinity) return -1;
|
||||
return (num1 - num2) / (num1 + num2);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bufferTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/bufferTime.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAA+C;AAE/C,qCAAuC;AACvC,2DAAgE;AAChE,+CAA8C;AAC9C,4CAAoD;AACpD,qCAA4C;AAC5C,2DAA0D;AAsE1D,SAAgB,UAAU,CAAI,cAAsB;;IAAE,mBAAmB;SAAnB,UAAmB,EAAnB,qBAAmB,EAAnB,IAAmB;QAAnB,kCAAmB;;IACvE,IAAM,SAAS,GAAG,MAAA,mBAAY,CAAC,SAAS,CAAC,mCAAI,sBAAc,CAAC;IAC5D,IAAM,sBAAsB,GAAG,MAAC,SAAS,CAAC,CAAC,CAAY,mCAAI,IAAI,CAAC;IAChE,IAAM,aAAa,GAAI,SAAS,CAAC,CAAC,CAAY,IAAI,QAAQ,CAAC;IAE3D,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAEhC,IAAI,aAAa,GAAiD,EAAE,CAAC;QAGrE,IAAI,aAAa,GAAG,KAAK,CAAC;QAQ1B,IAAM,IAAI,GAAG,UAAC,MAA2C;YAC/C,IAAA,MAAM,GAAW,MAAM,OAAjB,EAAE,IAAI,GAAK,MAAM,KAAX,CAAY;YAChC,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,qBAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACxB,aAAa,IAAI,WAAW,EAAE,CAAC;QACjC,CAAC,CAAC;QAOF,IAAM,WAAW,GAAG;YAClB,IAAI,aAAa,EAAE;gBACjB,IAAM,IAAI,GAAG,IAAI,2BAAY,EAAE,CAAC;gBAChC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACrB,IAAM,MAAM,GAAQ,EAAE,CAAC;gBACvB,IAAM,QAAM,GAAG;oBACb,MAAM,QAAA;oBACN,IAAI,MAAA;iBACL,CAAC;gBACF,aAAa,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBAC3B,iCAAe,CAAC,IAAI,EAAE,SAAS,EAAE,cAAM,OAAA,IAAI,CAAC,QAAM,CAAC,EAAZ,CAAY,EAAE,cAAc,CAAC,CAAC;aACtE;QACH,CAAC,CAAC;QAEF,IAAI,sBAAsB,KAAK,IAAI,IAAI,sBAAsB,IAAI,CAAC,EAAE;YAIlE,iCAAe,CAAC,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,sBAAsB,EAAE,IAAI,CAAC,CAAC;SACnF;aAAM;YACL,aAAa,GAAG,IAAI,CAAC;SACtB;QAED,WAAW,EAAE,CAAC;QAEd,IAAM,oBAAoB,GAAG,6CAAwB,CACnD,UAAU,EACV,UAAC,KAAQ;;YAKP,IAAM,WAAW,GAAG,aAAc,CAAC,KAAK,EAAE,CAAC;;gBAC3C,KAAqB,IAAA,gBAAA,SAAA,WAAW,CAAA,wCAAA,iEAAE;oBAA7B,IAAM,MAAM,wBAAA;oBAEP,IAAA,MAAM,GAAK,MAAM,OAAX,CAAY;oBAC1B,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAEnB,aAAa,IAAI,MAAM,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC;iBAChD;;;;;;;;;QACH,CAAC,EACD;YAGE,OAAO,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,EAAE;gBAC5B,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAG,CAAC,MAAM,CAAC,CAAC;aAChD;YACD,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,WAAW,EAAE,CAAC;YACpC,UAAU,CAAC,QAAQ,EAAE,CAAC;YACtB,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,EAED,SAAS,EAET,cAAM,OAAA,CAAC,aAAa,GAAG,IAAI,CAAC,EAAtB,CAAsB,CAC7B,CAAC;QAEF,MAAM,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC;AA1FD,gCA0FC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"windowToggle.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/windowToggle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAC/B,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAC5B,eAAe,EAAE,CAAC,SAAS,EAAE,CAAC,KAAK,eAAe,CAAC,GAAG,CAAC,GACtD,gBAAgB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAyEpC"}
|
||||
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var callBound = require('call-bind/callBound');
|
||||
var isLeadingSurrogate = require('../helpers/isLeadingSurrogate');
|
||||
var isTrailingSurrogate = require('../helpers/isTrailingSurrogate');
|
||||
|
||||
var Type = require('./Type');
|
||||
var UTF16DecodeSurrogatePair = require('./UTF16DecodeSurrogatePair');
|
||||
|
||||
var $charAt = callBound('String.prototype.charAt');
|
||||
var $charCodeAt = callBound('String.prototype.charCodeAt');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-codepointat
|
||||
|
||||
module.exports = function CodePointAt(string, position) {
|
||||
if (Type(string) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `string` must be a String');
|
||||
}
|
||||
var size = string.length;
|
||||
if (position < 0 || position >= size) {
|
||||
throw new $TypeError('Assertion failed: `position` must be >= 0, and < the length of `string`');
|
||||
}
|
||||
var first = $charCodeAt(string, position);
|
||||
var cp = $charAt(string, position);
|
||||
var firstIsLeading = isLeadingSurrogate(first);
|
||||
var firstIsTrailing = isTrailingSurrogate(first);
|
||||
if (!firstIsLeading && !firstIsTrailing) {
|
||||
return {
|
||||
'[[CodePoint]]': cp,
|
||||
'[[CodeUnitCount]]': 1,
|
||||
'[[IsUnpairedSurrogate]]': false
|
||||
};
|
||||
}
|
||||
if (firstIsTrailing || (position + 1 === size)) {
|
||||
return {
|
||||
'[[CodePoint]]': cp,
|
||||
'[[CodeUnitCount]]': 1,
|
||||
'[[IsUnpairedSurrogate]]': true
|
||||
};
|
||||
}
|
||||
var second = $charCodeAt(string, position + 1);
|
||||
if (!isTrailingSurrogate(second)) {
|
||||
return {
|
||||
'[[CodePoint]]': cp,
|
||||
'[[CodeUnitCount]]': 1,
|
||||
'[[IsUnpairedSurrogate]]': true
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
'[[CodePoint]]': UTF16DecodeSurrogatePair(first, second),
|
||||
'[[CodeUnitCount]]': 2,
|
||||
'[[IsUnpairedSurrogate]]': false
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
export default class WeakableMap {
|
||||
constructor() {
|
||||
Object.defineProperty(this, "weakMap", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
Object.defineProperty(this, "map", {
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true,
|
||||
value: void 0
|
||||
});
|
||||
this.weakMap = new WeakMap();
|
||||
this.map = new Map();
|
||||
}
|
||||
set(key, value) {
|
||||
if (typeof key === 'object') {
|
||||
this.weakMap.set(key, value);
|
||||
}
|
||||
else {
|
||||
this.map.set(key, value);
|
||||
}
|
||||
}
|
||||
get(key) {
|
||||
if (typeof key === 'object') {
|
||||
return this.weakMap.get(key);
|
||||
}
|
||||
return this.map.get(key);
|
||||
}
|
||||
has(key) {
|
||||
if (typeof key === 'object') {
|
||||
return this.weakMap.has(key);
|
||||
}
|
||||
return this.map.has(key);
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"map.js","sourceRoot":"","sources":["../../../../src/internal/operators/map.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA6ChE,MAAM,UAAU,GAAG,CAAO,OAAuC,EAAE,OAAa;IAC9E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QAEpC,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,MAAM,CAAC,SAAS,CACd,wBAAwB,CAAC,UAAU,EAAE,CAAC,KAAQ,EAAE,EAAE;YAGhD,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;QACzD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,152 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = {
|
||||
"aliceblue": [240, 248, 255],
|
||||
"antiquewhite": [250, 235, 215],
|
||||
"aqua": [0, 255, 255],
|
||||
"aquamarine": [127, 255, 212],
|
||||
"azure": [240, 255, 255],
|
||||
"beige": [245, 245, 220],
|
||||
"bisque": [255, 228, 196],
|
||||
"black": [0, 0, 0],
|
||||
"blanchedalmond": [255, 235, 205],
|
||||
"blue": [0, 0, 255],
|
||||
"blueviolet": [138, 43, 226],
|
||||
"brown": [165, 42, 42],
|
||||
"burlywood": [222, 184, 135],
|
||||
"cadetblue": [95, 158, 160],
|
||||
"chartreuse": [127, 255, 0],
|
||||
"chocolate": [210, 105, 30],
|
||||
"coral": [255, 127, 80],
|
||||
"cornflowerblue": [100, 149, 237],
|
||||
"cornsilk": [255, 248, 220],
|
||||
"crimson": [220, 20, 60],
|
||||
"cyan": [0, 255, 255],
|
||||
"darkblue": [0, 0, 139],
|
||||
"darkcyan": [0, 139, 139],
|
||||
"darkgoldenrod": [184, 134, 11],
|
||||
"darkgray": [169, 169, 169],
|
||||
"darkgreen": [0, 100, 0],
|
||||
"darkgrey": [169, 169, 169],
|
||||
"darkkhaki": [189, 183, 107],
|
||||
"darkmagenta": [139, 0, 139],
|
||||
"darkolivegreen": [85, 107, 47],
|
||||
"darkorange": [255, 140, 0],
|
||||
"darkorchid": [153, 50, 204],
|
||||
"darkred": [139, 0, 0],
|
||||
"darksalmon": [233, 150, 122],
|
||||
"darkseagreen": [143, 188, 143],
|
||||
"darkslateblue": [72, 61, 139],
|
||||
"darkslategray": [47, 79, 79],
|
||||
"darkslategrey": [47, 79, 79],
|
||||
"darkturquoise": [0, 206, 209],
|
||||
"darkviolet": [148, 0, 211],
|
||||
"deeppink": [255, 20, 147],
|
||||
"deepskyblue": [0, 191, 255],
|
||||
"dimgray": [105, 105, 105],
|
||||
"dimgrey": [105, 105, 105],
|
||||
"dodgerblue": [30, 144, 255],
|
||||
"firebrick": [178, 34, 34],
|
||||
"floralwhite": [255, 250, 240],
|
||||
"forestgreen": [34, 139, 34],
|
||||
"fuchsia": [255, 0, 255],
|
||||
"gainsboro": [220, 220, 220],
|
||||
"ghostwhite": [248, 248, 255],
|
||||
"gold": [255, 215, 0],
|
||||
"goldenrod": [218, 165, 32],
|
||||
"gray": [128, 128, 128],
|
||||
"green": [0, 128, 0],
|
||||
"greenyellow": [173, 255, 47],
|
||||
"grey": [128, 128, 128],
|
||||
"honeydew": [240, 255, 240],
|
||||
"hotpink": [255, 105, 180],
|
||||
"indianred": [205, 92, 92],
|
||||
"indigo": [75, 0, 130],
|
||||
"ivory": [255, 255, 240],
|
||||
"khaki": [240, 230, 140],
|
||||
"lavender": [230, 230, 250],
|
||||
"lavenderblush": [255, 240, 245],
|
||||
"lawngreen": [124, 252, 0],
|
||||
"lemonchiffon": [255, 250, 205],
|
||||
"lightblue": [173, 216, 230],
|
||||
"lightcoral": [240, 128, 128],
|
||||
"lightcyan": [224, 255, 255],
|
||||
"lightgoldenrodyellow": [250, 250, 210],
|
||||
"lightgray": [211, 211, 211],
|
||||
"lightgreen": [144, 238, 144],
|
||||
"lightgrey": [211, 211, 211],
|
||||
"lightpink": [255, 182, 193],
|
||||
"lightsalmon": [255, 160, 122],
|
||||
"lightseagreen": [32, 178, 170],
|
||||
"lightskyblue": [135, 206, 250],
|
||||
"lightslategray": [119, 136, 153],
|
||||
"lightslategrey": [119, 136, 153],
|
||||
"lightsteelblue": [176, 196, 222],
|
||||
"lightyellow": [255, 255, 224],
|
||||
"lime": [0, 255, 0],
|
||||
"limegreen": [50, 205, 50],
|
||||
"linen": [250, 240, 230],
|
||||
"magenta": [255, 0, 255],
|
||||
"maroon": [128, 0, 0],
|
||||
"mediumaquamarine": [102, 205, 170],
|
||||
"mediumblue": [0, 0, 205],
|
||||
"mediumorchid": [186, 85, 211],
|
||||
"mediumpurple": [147, 112, 219],
|
||||
"mediumseagreen": [60, 179, 113],
|
||||
"mediumslateblue": [123, 104, 238],
|
||||
"mediumspringgreen": [0, 250, 154],
|
||||
"mediumturquoise": [72, 209, 204],
|
||||
"mediumvioletred": [199, 21, 133],
|
||||
"midnightblue": [25, 25, 112],
|
||||
"mintcream": [245, 255, 250],
|
||||
"mistyrose": [255, 228, 225],
|
||||
"moccasin": [255, 228, 181],
|
||||
"navajowhite": [255, 222, 173],
|
||||
"navy": [0, 0, 128],
|
||||
"oldlace": [253, 245, 230],
|
||||
"olive": [128, 128, 0],
|
||||
"olivedrab": [107, 142, 35],
|
||||
"orange": [255, 165, 0],
|
||||
"orangered": [255, 69, 0],
|
||||
"orchid": [218, 112, 214],
|
||||
"palegoldenrod": [238, 232, 170],
|
||||
"palegreen": [152, 251, 152],
|
||||
"paleturquoise": [175, 238, 238],
|
||||
"palevioletred": [219, 112, 147],
|
||||
"papayawhip": [255, 239, 213],
|
||||
"peachpuff": [255, 218, 185],
|
||||
"peru": [205, 133, 63],
|
||||
"pink": [255, 192, 203],
|
||||
"plum": [221, 160, 221],
|
||||
"powderblue": [176, 224, 230],
|
||||
"purple": [128, 0, 128],
|
||||
"rebeccapurple": [102, 51, 153],
|
||||
"red": [255, 0, 0],
|
||||
"rosybrown": [188, 143, 143],
|
||||
"royalblue": [65, 105, 225],
|
||||
"saddlebrown": [139, 69, 19],
|
||||
"salmon": [250, 128, 114],
|
||||
"sandybrown": [244, 164, 96],
|
||||
"seagreen": [46, 139, 87],
|
||||
"seashell": [255, 245, 238],
|
||||
"sienna": [160, 82, 45],
|
||||
"silver": [192, 192, 192],
|
||||
"skyblue": [135, 206, 235],
|
||||
"slateblue": [106, 90, 205],
|
||||
"slategray": [112, 128, 144],
|
||||
"slategrey": [112, 128, 144],
|
||||
"snow": [255, 250, 250],
|
||||
"springgreen": [0, 255, 127],
|
||||
"steelblue": [70, 130, 180],
|
||||
"tan": [210, 180, 140],
|
||||
"teal": [0, 128, 128],
|
||||
"thistle": [216, 191, 216],
|
||||
"tomato": [255, 99, 71],
|
||||
"turquoise": [64, 224, 208],
|
||||
"violet": [238, 130, 238],
|
||||
"wheat": [245, 222, 179],
|
||||
"white": [255, 255, 255],
|
||||
"whitesmoke": [245, 245, 245],
|
||||
"yellow": [255, 255, 0],
|
||||
"yellowgreen": [154, 205, 50]
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
export interface FileLike {
|
||||
/**
|
||||
* Name of the file referenced by the File object.
|
||||
*/
|
||||
readonly name: string;
|
||||
/**
|
||||
* Returns the media type ([`MIME`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)) of the file represented by a `File` object.
|
||||
*/
|
||||
readonly type: string;
|
||||
/**
|
||||
* Size of the file parts in bytes
|
||||
*/
|
||||
readonly size: number;
|
||||
/**
|
||||
* The last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current date.
|
||||
*/
|
||||
readonly lastModified: number;
|
||||
/**
|
||||
* Returns a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream) which upon reading returns the data contained within the [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File).
|
||||
*/
|
||||
stream(): AsyncIterable<Uint8Array>;
|
||||
readonly [Symbol.toStringTag]: string;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = require("./is-implemented")() ? Math.expm1 : require("./shim");
|
||||
@@ -0,0 +1,104 @@
|
||||
import Container, { ContainerProps } from './container.js'
|
||||
|
||||
interface RuleRaws extends Record<string, unknown> {
|
||||
/**
|
||||
* The space symbols before the node. It also stores `*`
|
||||
* and `_` symbols before the declaration (IE hack).
|
||||
*/
|
||||
before?: string
|
||||
|
||||
/**
|
||||
* The space symbols after the last child of the node to the end of the node.
|
||||
*/
|
||||
after?: string
|
||||
|
||||
/**
|
||||
* The symbols between the selector and `{` for rules.
|
||||
*/
|
||||
between?: string
|
||||
|
||||
/**
|
||||
* Contains `true` if the last child has an (optional) semicolon.
|
||||
*/
|
||||
semicolon?: boolean
|
||||
|
||||
/**
|
||||
* Contains `true` if there is semicolon after rule.
|
||||
*/
|
||||
ownSemicolon?: string
|
||||
|
||||
/**
|
||||
* The rule’s selector with comments.
|
||||
*/
|
||||
selector?: {
|
||||
value: string
|
||||
raw: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface RuleProps extends ContainerProps {
|
||||
/** Selector or selectors of the rule. */
|
||||
selector?: string
|
||||
/** Selectors of the rule represented as an array of strings. */
|
||||
selectors?: string[]
|
||||
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
|
||||
raws?: RuleRaws
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a CSS rule: a selector followed by a declaration block.
|
||||
*
|
||||
* ```js
|
||||
* Once (root, { Rule }) {
|
||||
* let a = new Rule({ selector: 'a' })
|
||||
* a.append(…)
|
||||
* root.append(a)
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a{}')
|
||||
* const rule = root.first
|
||||
* rule.type //=> 'rule'
|
||||
* rule.toString() //=> 'a{}'
|
||||
* ```
|
||||
*/
|
||||
export default class Rule extends Container {
|
||||
type: 'rule'
|
||||
parent: Container | undefined
|
||||
raws: RuleRaws
|
||||
|
||||
/**
|
||||
* The rule’s full selector represented as a string.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a, b { }')
|
||||
* const rule = root.first
|
||||
* rule.selector //=> 'a, b'
|
||||
* ```
|
||||
*/
|
||||
selector: string
|
||||
|
||||
/**
|
||||
* An array containing the rule’s individual selectors.
|
||||
* Groups of selectors are split at commas.
|
||||
*
|
||||
* ```js
|
||||
* const root = postcss.parse('a, b { }')
|
||||
* const rule = root.first
|
||||
*
|
||||
* rule.selector //=> 'a, b'
|
||||
* rule.selectors //=> ['a', 'b']
|
||||
*
|
||||
* rule.selectors = ['a', 'strong']
|
||||
* rule.selector //=> 'a, strong'
|
||||
* ```
|
||||
*/
|
||||
selectors: string[]
|
||||
|
||||
constructor(defaults?: RuleProps)
|
||||
assign(overrides: object | RuleProps): this
|
||||
clone(overrides?: Partial<RuleProps>): this
|
||||
cloneBefore(overrides?: Partial<RuleProps>): this
|
||||
cloneAfter(overrides?: Partial<RuleProps>): this
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
"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 (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
if (typeof b !== "function" && b !== null)
|
||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.AsyncSubject = void 0;
|
||||
var Subject_1 = require("./Subject");
|
||||
var AsyncSubject = (function (_super) {
|
||||
__extends(AsyncSubject, _super);
|
||||
function AsyncSubject() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this._value = null;
|
||||
_this._hasValue = false;
|
||||
_this._isComplete = false;
|
||||
return _this;
|
||||
}
|
||||
AsyncSubject.prototype._checkFinalizedStatuses = function (subscriber) {
|
||||
var _a = this, hasError = _a.hasError, _hasValue = _a._hasValue, _value = _a._value, thrownError = _a.thrownError, isStopped = _a.isStopped, _isComplete = _a._isComplete;
|
||||
if (hasError) {
|
||||
subscriber.error(thrownError);
|
||||
}
|
||||
else if (isStopped || _isComplete) {
|
||||
_hasValue && subscriber.next(_value);
|
||||
subscriber.complete();
|
||||
}
|
||||
};
|
||||
AsyncSubject.prototype.next = function (value) {
|
||||
if (!this.isStopped) {
|
||||
this._value = value;
|
||||
this._hasValue = true;
|
||||
}
|
||||
};
|
||||
AsyncSubject.prototype.complete = function () {
|
||||
var _a = this, _hasValue = _a._hasValue, _value = _a._value, _isComplete = _a._isComplete;
|
||||
if (!_isComplete) {
|
||||
this._isComplete = true;
|
||||
_hasValue && _super.prototype.next.call(this, _value);
|
||||
_super.prototype.complete.call(this);
|
||||
}
|
||||
};
|
||||
return AsyncSubject;
|
||||
}(Subject_1.Subject));
|
||||
exports.AsyncSubject = AsyncSubject;
|
||||
//# sourceMappingURL=AsyncSubject.js.map
|
||||
Reference in New Issue
Block a user