new license file version [CI SKIP]

This commit is contained in:
2023-03-15 12:34:41 +00:00
parent 0a6d92a1f3
commit 61328d20ed
13115 changed files with 1892314 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
# String.prototype.trimStart <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
An ES2019-spec-compliant `String.prototype.trimStart` shim. Invoke its "shim" method to shim `String.prototype.trimStart` if it is unavailable.
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s.
Most common usage:
```js
var trimStart = require('string.prototype.trimstart');
assert(trimStart(' \t\na \t\n') === 'a \t\n');
if (!String.prototype.trimStart) {
trimStart.shim();
}
assert(trimStart(' \t\na \t\n') === ' \t\na \t\n'.trimStart());
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.com/package/string.prototype.trimstart
[npm-version-svg]: https://vb.teelaun.ch/es-shims/String.prototype.trimStart.svg
[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart.svg
[deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart
[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/string.prototype.trimstart.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/string.prototype.trimstart.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimstart.svg
[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimstart
[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimStart/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimStart/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimStart
[actions-url]: https://github.com/es-shims/String.prototype.trimStart/actions

View File

@@ -0,0 +1,7 @@
var NO_PROTOCOL_RESOURCE_PATTERN = /^\/\//;
function hasProtocol(uri) {
return !NO_PROTOCOL_RESOURCE_PATTERN.test(uri);
}
module.exports = hasProtocol;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"isArrayLike.js","sourceRoot":"","sources":["../../../../src/internal/util/isArrayLike.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAI,CAAM,EAAqB,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"repeatWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/repeatWhen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAoChE,MAAM,UAAU,UAAU,CAAI,QAAmE;IAC/F,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,YAA2B,CAAC;QAChC,IAAI,kBAAkB,GAAG,KAAK,CAAC;QAC/B,IAAI,cAAc,GAAG,KAAK,CAAC;QAK3B,MAAM,aAAa,GAAG,GAAG,EAAE,CAAC,cAAc,IAAI,kBAAkB,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;QAKlG,MAAM,oBAAoB,GAAG,GAAG,EAAE;YAChC,IAAI,CAAC,YAAY,EAAE;gBACjB,YAAY,GAAG,IAAI,OAAO,EAAE,CAAC;gBAI7B,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CACzC,wBAAwB,CACtB,UAAU,EACV,GAAG,EAAE;oBACH,IAAI,QAAQ,EAAE;wBACZ,sBAAsB,EAAE,CAAC;qBAC1B;yBAAM;wBAKL,SAAS,GAAG,IAAI,CAAC;qBAClB;gBACH,CAAC,EACD,GAAG,EAAE;oBACH,kBAAkB,GAAG,IAAI,CAAC;oBAC1B,aAAa,EAAE,CAAC;gBAClB,CAAC,CACF,CACF,CAAC;aACH;YACD,OAAO,YAAY,CAAC;QACtB,CAAC,CAAC;QAEF,MAAM,sBAAsB,GAAG,GAAG,EAAE;YAClC,cAAc,GAAG,KAAK,CAAC;YAEvB,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,wBAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,EAAE;gBACnD,cAAc,GAAG,IAAI,CAAC;gBAMtB,CAAC,aAAa,EAAE,IAAI,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;YACpD,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBAIvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,sBAAsB,EAAE,CAAC;aAC1B;QACH,CAAC,CAAC;QAGF,sBAAsB,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1,49 @@
var createPadding = require('./_createPadding'),
stringSize = require('./_stringSize'),
toInteger = require('./toInteger'),
toString = require('./toString');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
nativeFloor = Math.floor;
/**
* Pads `string` on the left and right sides if it's shorter than `length`.
* Padding characters are truncated if they can't be evenly divided by `length`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.pad('abc', 8);
* // => ' abc '
*
* _.pad('abc', 8, '_-');
* // => '_-abc_-_'
*
* _.pad('abc', 3);
* // => 'abc'
*/
function pad(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
if (!length || strLength >= length) {
return string;
}
var mid = (length - strLength) / 2;
return (
createPadding(nativeFloor(mid), chars) +
string +
createPadding(nativeCeil(mid), chars)
);
}
module.exports = pad;

View File

@@ -0,0 +1,43 @@
# es-abstract <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
ECMAScript spec abstract operations.
Every operation is available by edition/year and by name - for example, `es-abstract/2020/Call` gives you the `Call` operation from ES2020, `es-abstract/5/Type` gives you the `Type` operation from ES5.
All abstract operations are also available under an `es5`/`es2015`/`es2016`/`es2017`/`es2018`/`es2019`/`es2020`/`es2021` entry point, and as a property on the `main` export, but using deep imports is highly encouraged for bundle size and performance reasons. Non-deep entry points will be removed in the next semver-major release.
## Example
```js
var ES = require('es-abstract');
var assert = require('assert');
assert(ES.isCallable(function () {}));
assert(!ES.isCallable(/a/g));
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
## Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
[package-url]: https://npmjs.org/package/es-abstract
[npm-version-svg]: https://versionbadg.es/ljharb/es-abstract.svg
[deps-svg]: https://david-dm.org/ljharb/es-abstract.svg
[deps-url]: https://david-dm.org/ljharb/es-abstract
[dev-deps-svg]: https://david-dm.org/ljharb/es-abstract/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/es-abstract#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/es-abstract.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/es-abstract.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/es-abstract.svg
[downloads-url]: https://npm-stat.com/charts.html?package=es-abstract

View File

@@ -0,0 +1,93 @@
// eslint-disable-next-line import/no-unresolved
import { BaseNode } from 'estree';
export interface AttachedScope {
parent?: AttachedScope;
isBlockScope: boolean;
declarations: { [key: string]: boolean };
addDeclaration(node: BaseNode, isBlockDeclaration: boolean, isVar: boolean): void;
contains(name: string): boolean;
}
export interface DataToEsmOptions {
compact?: boolean;
indent?: string;
namedExports?: boolean;
objectShorthand?: boolean;
preferConst?: boolean;
}
/**
* A valid `picomatch` glob pattern, or array of patterns.
*/
export type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
/**
* Adds an extension to a module ID if one does not exist.
*/
export function addExtension(filename: string, ext?: string): string;
/**
* Attaches `Scope` objects to the relevant nodes of an AST.
* Each `Scope` object has a `scope.contains(name)` method that returns `true`
* if a given name is defined in the current scope or a parent scope.
*/
export function attachScopes(ast: BaseNode, propertyName?: string): AttachedScope;
/**
* Constructs a filter function which can be used to determine whether or not
* certain modules should be operated upon.
* @param include If `include` is omitted or has zero length, filter will return `true` by default.
* @param exclude ID must not match any of the `exclude` patterns.
* @param options Optionally resolves the patterns against a directory other than `process.cwd()`.
* If a `string` is specified, then the value will be used as the base directory.
* Relative paths will be resolved against `process.cwd()` first.
* If `false`, then the patterns will not be resolved against any directory.
* This can be useful if you want to create a filter for virtual module names.
*/
export function createFilter(
include?: FilterPattern,
exclude?: FilterPattern,
options?: { resolve?: string | false | null }
): (id: string | unknown) => boolean;
/**
* Transforms objects into tree-shakable ES Module imports.
* @param data An object to transform into an ES module.
*/
export function dataToEsm(data: unknown, options?: DataToEsmOptions): string;
/**
* Extracts the names of all assignment targets based upon specified patterns.
* @param param An `acorn` AST Node.
*/
export function extractAssignedNames(param: BaseNode): string[];
/**
* Constructs a bundle-safe identifier from a `string`.
*/
export function makeLegalIdentifier(str: string): string;
/**
* Converts path separators to forward slash.
*/
export function normalizePath(filename: string): string;
export type AddExtension = typeof addExtension;
export type AttachScopes = typeof attachScopes;
export type CreateFilter = typeof createFilter;
export type ExtractAssignedNames = typeof extractAssignedNames;
export type MakeLegalIdentifier = typeof makeLegalIdentifier;
export type NormalizePath = typeof normalizePath;
export type DataToEsm = typeof dataToEsm;
declare const defaultExport: {
addExtension: AddExtension;
attachScopes: AttachScopes;
createFilter: CreateFilter;
dataToEsm: DataToEsm;
extractAssignedNames: ExtractAssignedNames;
makeLegalIdentifier: MakeLegalIdentifier;
normalizePath: NormalizePath;
};
export default defaultExport;

View File

@@ -0,0 +1,130 @@
import { Observable } from '../Observable';
import { Subject } from '../Subject';
import { OperatorFunction } from '../types';
import { operate } from '../util/lift';
import { createOperatorSubscriber } from './OperatorSubscriber';
/**
* Branch out the source Observable values as a nested Observable with each
* nested Observable emitting at most `windowSize` values.
*
* <span class="informal">It's like {@link bufferCount}, but emits a nested
* Observable instead of an array.</span>
*
* ![](windowCount.png)
*
* Returns an Observable that emits windows of items it collects from the source
* Observable. The output Observable emits windows every `startWindowEvery`
* items, each containing no more than `windowSize` items. When the source
* Observable completes or encounters an error, the output Observable emits
* the current window and propagates the notification from the source
* Observable. If `startWindowEvery` is not provided, then new windows are
* started immediately at the start of the source and when each window completes
* with size `windowSize`.
*
* ## Examples
*
* Ignore every 3rd click event, starting from the first one
*
* ```ts
* import { fromEvent, windowCount, map, skip, mergeAll } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* windowCount(3),
* map(win => win.pipe(skip(1))), // skip first of every 3 clicks
* mergeAll() // flatten the Observable-of-Observables
* );
* result.subscribe(x => console.log(x));
* ```
*
* Ignore every 3rd click event, starting from the third one
*
* ```ts
* import { fromEvent, windowCount, mergeAll } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* windowCount(2, 3),
* mergeAll() // flatten the Observable-of-Observables
* );
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link window}
* @see {@link windowTime}
* @see {@link windowToggle}
* @see {@link windowWhen}
* @see {@link bufferCount}
*
* @param {number} windowSize The maximum number of values emitted by each
* window.
* @param {number} [startWindowEvery] Interval at which to start a new window.
* For example if `startWindowEvery` is `2`, then a new window will be started
* on every other value from the source. A new window is started at the
* beginning of the source by default.
* @return A function that returns an Observable of windows, which in turn are
* Observable of values.
*/
export function windowCount<T>(windowSize: number, startWindowEvery: number = 0): OperatorFunction<T, Observable<T>> {
const startEvery = startWindowEvery > 0 ? startWindowEvery : windowSize;
return operate((source, subscriber) => {
let windows = [new Subject<T>()];
let starts: number[] = [];
let count = 0;
// Open the first window.
subscriber.next(windows[0].asObservable());
source.subscribe(
createOperatorSubscriber(
subscriber,
(value: T) => {
// Emit the value through all current windows.
// We don't need to create a new window yet, we
// do that as soon as we close one.
for (const window of windows) {
window.next(value);
}
// Here we're using the size of the window array to figure
// out if the oldest window has emitted enough values. We can do this
// because the size of the window array is a function of the values
// seen by the subscription. If it's time to close it, we complete
// it and remove it.
const c = count - windowSize + 1;
if (c >= 0 && c % startEvery === 0) {
windows.shift()!.complete();
}
// Look to see if the next count tells us it's time to open a new window.
// TODO: We need to figure out if this really makes sense. We're technically
// emitting windows *before* we have a value to emit them for. It's probably
// more expected that we should be emitting the window when the start
// count is reached -- not before.
if (++count % startEvery === 0) {
const window = new Subject<T>();
windows.push(window);
subscriber.next(window.asObservable());
}
},
() => {
while (windows.length > 0) {
windows.shift()!.complete();
}
subscriber.complete();
},
(err) => {
while (windows.length > 0) {
windows.shift()!.error(err);
}
subscriber.error(err);
},
() => {
starts = null!;
windows = null!;
}
)
);
});
}

View File

@@ -0,0 +1,744 @@
'use strict';
module.exports = {
IsPropertyDescriptor: 'https://262.ecma-international.org/6.0/#sec-property-descriptor-specification-type', // not actually an abstract op
abs: {
url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions'
},
'Abstract Equality Comparison': {
url: 'https://262.ecma-international.org/6.0/#sec-abstract-equality-comparison'
},
'Abstract Relational Comparison': {
url: 'https://262.ecma-international.org/6.0/#sec-abstract-relational-comparison'
},
AddRestrictedFunctionProperties: {
url: 'https://262.ecma-international.org/6.0/#sec-addrestrictedfunctionproperties'
},
AdvanceStringIndex: {
url: 'https://262.ecma-international.org/6.0/#sec-advancestringindex'
},
AllocateArrayBuffer: {
url: 'https://262.ecma-international.org/6.0/#sec-allocatearraybuffer'
},
AllocateTypedArray: {
url: 'https://262.ecma-international.org/6.0/#sec-allocatetypedarray'
},
ArrayCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-arraycreate'
},
ArraySetLength: {
url: 'https://262.ecma-international.org/6.0/#sec-arraysetlength'
},
ArraySpeciesCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-arrayspeciescreate'
},
BoundFunctionCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-boundfunctioncreate'
},
Call: {
url: 'https://262.ecma-international.org/6.0/#sec-call'
},
Canonicalize: {
url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-canonicalize-ch'
},
CanonicalNumericIndexString: {
url: 'https://262.ecma-international.org/6.0/#sec-canonicalnumericindexstring'
},
CharacterRange: {
url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-characterrange-abstract-operation'
},
CharacterSetMatcher: {
url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-charactersetmatcher-abstract-operation'
},
CloneArrayBuffer: {
url: 'https://262.ecma-international.org/6.0/#sec-clonearraybuffer'
},
CompletePropertyDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-completepropertydescriptor'
},
Completion: {
url: 'https://262.ecma-international.org/6.0/#sec-implicit-completion-values'
},
CompletionRecord: {
url: 'https://262.ecma-international.org/6.0/#sec-completion-record-specification-type'
},
Construct: {
url: 'https://262.ecma-international.org/6.0/#sec-construct'
},
CopyDataBlockBytes: {
url: 'https://262.ecma-international.org/6.0/#sec-copydatablockbytes'
},
CreateArrayFromList: {
url: 'https://262.ecma-international.org/6.0/#sec-createarrayfromlist'
},
CreateArrayIterator: {
url: 'https://262.ecma-international.org/6.0/#sec-createarrayiterator'
},
CreateBuiltinFunction: {
url: 'https://262.ecma-international.org/6.0/#sec-createbuiltinfunction'
},
CreateByteDataBlock: {
url: 'https://262.ecma-international.org/6.0/#sec-createbytedatablock'
},
CreateDataProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-createdataproperty'
},
CreateDataPropertyOrThrow: {
url: 'https://262.ecma-international.org/6.0/#sec-createdatapropertyorthrow'
},
CreateDynamicFunction: {
url: 'https://262.ecma-international.org/6.0/#sec-createdynamicfunction'
},
CreateHTML: {
url: 'https://262.ecma-international.org/6.0/#sec-createhtml'
},
CreateIntrinsics: {
url: 'https://262.ecma-international.org/6.0/#sec-createintrinsics'
},
CreateIterResultObject: {
url: 'https://262.ecma-international.org/6.0/#sec-createiterresultobject'
},
CreateListFromArrayLike: {
url: 'https://262.ecma-international.org/6.0/#sec-createlistfromarraylike'
},
CreateListIterator: {
url: 'https://262.ecma-international.org/6.0/#sec-createlistiterator'
},
CreateMapIterator: {
url: 'https://262.ecma-international.org/6.0/#sec-createmapiterator'
},
CreateMappedArgumentsObject: {
url: 'https://262.ecma-international.org/6.0/#sec-createmappedargumentsobject'
},
CreateMethodProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-createmethodproperty'
},
CreatePerIterationEnvironment: {
url: 'https://262.ecma-international.org/6.0/#sec-createperiterationenvironment'
},
CreateRealm: {
url: 'https://262.ecma-international.org/6.0/#sec-createrealm'
},
CreateSetIterator: {
url: 'https://262.ecma-international.org/6.0/#sec-createsetiterator'
},
CreateUnmappedArgumentsObject: {
url: 'https://262.ecma-international.org/6.0/#sec-createunmappedargumentsobject'
},
DateFromTime: {
url: 'https://262.ecma-international.org/6.0/#sec-date-number'
},
Day: {
url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day'
},
DayFromYear: {
url: 'https://262.ecma-international.org/6.0/#sec-year-number'
},
DaylightSavingTA: {
url: 'https://262.ecma-international.org/6.0/#sec-daylight-saving-time-adjustment'
},
DaysInYear: {
url: 'https://262.ecma-international.org/6.0/#sec-year-number'
},
DayWithinYear: {
url: 'https://262.ecma-international.org/6.0/#sec-month-number'
},
Decode: {
url: 'https://262.ecma-international.org/6.0/#sec-decode'
},
DefinePropertyOrThrow: {
url: 'https://262.ecma-international.org/6.0/#sec-definepropertyorthrow'
},
DeletePropertyOrThrow: {
url: 'https://262.ecma-international.org/6.0/#sec-deletepropertyorthrow'
},
DetachArrayBuffer: {
url: 'https://262.ecma-international.org/6.0/#sec-detacharraybuffer'
},
Encode: {
url: 'https://262.ecma-international.org/6.0/#sec-encode'
},
EnqueueJob: {
url: 'https://262.ecma-international.org/6.0/#sec-enqueuejob'
},
EnumerableOwnNames: {
url: 'https://262.ecma-international.org/6.0/#sec-enumerableownnames'
},
EscapeRegExpPattern: {
url: 'https://262.ecma-international.org/6.0/#sec-escaperegexppattern'
},
EvalDeclarationInstantiation: {
url: 'https://262.ecma-international.org/6.0/#sec-evaldeclarationinstantiation'
},
EvaluateCall: {
url: 'https://262.ecma-international.org/6.0/#sec-evaluatecall'
},
EvaluateDirectCall: {
url: 'https://262.ecma-international.org/6.0/#sec-evaluatedirectcall'
},
EvaluateNew: {
url: 'https://262.ecma-international.org/6.0/#sec-evaluatenew'
},
floor: {
url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions'
},
ForBodyEvaluation: {
url: 'https://262.ecma-international.org/6.0/#sec-forbodyevaluation'
},
'ForIn/OfBodyEvaluation': {
url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset'
},
'ForIn/OfHeadEvaluation': {
url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind'
},
FromPropertyDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-frompropertydescriptor'
},
FulfillPromise: {
url: 'https://262.ecma-international.org/6.0/#sec-fulfillpromise'
},
FunctionAllocate: {
url: 'https://262.ecma-international.org/6.0/#sec-functionallocate'
},
FunctionCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-functioncreate'
},
FunctionInitialize: {
url: 'https://262.ecma-international.org/6.0/#sec-functioninitialize'
},
GeneratorFunctionCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-generatorfunctioncreate'
},
GeneratorResume: {
url: 'https://262.ecma-international.org/6.0/#sec-generatorresume'
},
GeneratorResumeAbrupt: {
url: 'https://262.ecma-international.org/6.0/#sec-generatorresumeabrupt'
},
GeneratorStart: {
url: 'https://262.ecma-international.org/6.0/#sec-generatorstart'
},
GeneratorValidate: {
url: 'https://262.ecma-international.org/6.0/#sec-generatorvalidate'
},
GeneratorYield: {
url: 'https://262.ecma-international.org/6.0/#sec-generatoryield'
},
Get: {
url: 'https://262.ecma-international.org/6.0/#sec-get-o-p'
},
GetBase: {
url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues'
},
GetFunctionRealm: {
url: 'https://262.ecma-international.org/6.0/#sec-getfunctionrealm'
},
GetGlobalObject: {
url: 'https://262.ecma-international.org/6.0/#sec-getglobalobject'
},
GetIdentifierReference: {
url: 'https://262.ecma-international.org/6.0/#sec-getidentifierreference'
},
GetIterator: {
url: 'https://262.ecma-international.org/6.0/#sec-getiterator'
},
GetMethod: {
url: 'https://262.ecma-international.org/6.0/#sec-getmethod'
},
GetModuleNamespace: {
url: 'https://262.ecma-international.org/6.0/#sec-getmodulenamespace'
},
GetNewTarget: {
url: 'https://262.ecma-international.org/6.0/#sec-getnewtarget'
},
GetOwnPropertyKeys: {
url: 'https://262.ecma-international.org/6.0/#sec-getownpropertykeys'
},
GetPrototypeFromConstructor: {
url: 'https://262.ecma-international.org/6.0/#sec-getprototypefromconstructor'
},
GetReferencedName: {
url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues'
},
GetSubstitution: {
url: 'https://262.ecma-international.org/6.0/#sec-getsubstitution'
},
GetSuperConstructor: {
url: 'https://262.ecma-international.org/6.0/#sec-getsuperconstructor'
},
GetTemplateObject: {
url: 'https://262.ecma-international.org/6.0/#sec-gettemplateobject'
},
GetThisEnvironment: {
url: 'https://262.ecma-international.org/6.0/#sec-getthisenvironment'
},
GetThisValue: {
url: 'https://262.ecma-international.org/6.0/#sec-getthisvalue'
},
GetV: {
url: 'https://262.ecma-international.org/6.0/#sec-getv'
},
GetValue: {
url: 'https://262.ecma-international.org/6.0/#sec-getvalue'
},
GetValueFromBuffer: {
url: 'https://262.ecma-international.org/6.0/#sec-getvaluefrombuffer'
},
GetViewValue: {
url: 'https://262.ecma-international.org/6.0/#sec-getviewvalue'
},
HasOwnProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-hasownproperty'
},
HasPrimitiveBase: {
url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues'
},
HasProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-hasproperty'
},
HourFromTime: {
url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds'
},
ImportedLocalNames: {
url: 'https://262.ecma-international.org/6.0/#sec-importedlocalnames'
},
InitializeHostDefinedRealm: {
url: 'https://262.ecma-international.org/6.0/#sec-initializehostdefinedrealm'
},
InitializeReferencedBinding: {
url: 'https://262.ecma-international.org/6.0/#sec-initializereferencedbinding'
},
InLeapYear: {
url: 'https://262.ecma-international.org/6.0/#sec-year-number'
},
InstanceofOperator: {
url: 'https://262.ecma-international.org/6.0/#sec-instanceofoperator'
},
IntegerIndexedElementGet: {
url: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementget'
},
IntegerIndexedElementSet: {
url: 'https://262.ecma-international.org/6.0/#sec-integerindexedelementset'
},
IntegerIndexedObjectCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-integerindexedobjectcreate'
},
InternalizeJSONProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-internalizejsonproperty'
},
Invoke: {
url: 'https://262.ecma-international.org/6.0/#sec-invoke'
},
IsAccessorDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-isaccessordescriptor'
},
IsAnonymousFunctionDefinition: {
url: 'https://262.ecma-international.org/6.0/#sec-isanonymousfunctiondefinition'
},
IsArray: {
url: 'https://262.ecma-international.org/6.0/#sec-isarray'
},
IsCallable: {
url: 'https://262.ecma-international.org/6.0/#sec-iscallable'
},
IsCompatiblePropertyDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-iscompatiblepropertydescriptor'
},
IsConcatSpreadable: {
url: 'https://262.ecma-international.org/6.0/#sec-isconcatspreadable'
},
IsConstructor: {
url: 'https://262.ecma-international.org/6.0/#sec-isconstructor'
},
IsDataDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-isdatadescriptor'
},
IsDetachedBuffer: {
url: 'https://262.ecma-international.org/6.0/#sec-isdetachedbuffer'
},
IsExtensible: {
url: 'https://262.ecma-international.org/6.0/#sec-isextensible-o'
},
IsGenericDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-isgenericdescriptor'
},
IsInTailPosition: {
url: 'https://262.ecma-international.org/6.0/#sec-isintailposition'
},
IsInteger: {
url: 'https://262.ecma-international.org/6.0/#sec-isinteger'
},
IsLabelledFunction: {
url: 'https://262.ecma-international.org/6.0/#sec-islabelledfunction'
},
IsPromise: {
url: 'https://262.ecma-international.org/6.0/#sec-ispromise'
},
IsPropertyKey: {
url: 'https://262.ecma-international.org/6.0/#sec-ispropertykey'
},
IsPropertyReference: {
url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues'
},
IsRegExp: {
url: 'https://262.ecma-international.org/6.0/#sec-isregexp'
},
IsStrictReference: {
url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues'
},
IsSuperReference: {
url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues'
},
IsUnresolvableReference: {
url: 'https://262.ecma-international.org/6.0/#sec-jobs-and-job-queues'
},
IsWordChar: {
url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-iswordchar-abstract-operation'
},
IteratorClose: {
url: 'https://262.ecma-international.org/6.0/#sec-iteratorclose'
},
IteratorComplete: {
url: 'https://262.ecma-international.org/6.0/#sec-iteratorcomplete'
},
IteratorNext: {
url: 'https://262.ecma-international.org/6.0/#sec-iteratornext'
},
IteratorStep: {
url: 'https://262.ecma-international.org/6.0/#sec-iteratorstep'
},
IteratorValue: {
url: 'https://262.ecma-international.org/6.0/#sec-iteratorvalue'
},
LocalTime: {
url: 'https://262.ecma-international.org/6.0/#sec-localtime'
},
LoopContinues: {
url: 'https://262.ecma-international.org/6.0/#sec-loopcontinues'
},
MakeArgGetter: {
url: 'https://262.ecma-international.org/6.0/#sec-makearggetter'
},
MakeArgSetter: {
url: 'https://262.ecma-international.org/6.0/#sec-makeargsetter'
},
MakeClassConstructor: {
url: 'https://262.ecma-international.org/6.0/#sec-makeclassconstructor'
},
MakeConstructor: {
url: 'https://262.ecma-international.org/6.0/#sec-makeconstructor'
},
MakeDate: {
url: 'https://262.ecma-international.org/6.0/#sec-makedate'
},
MakeDay: {
url: 'https://262.ecma-international.org/6.0/#sec-makeday'
},
MakeMethod: {
url: 'https://262.ecma-international.org/6.0/#sec-makemethod'
},
MakeSuperPropertyReference: {
url: 'https://262.ecma-international.org/6.0/#sec-makesuperpropertyreference'
},
MakeTime: {
url: 'https://262.ecma-international.org/6.0/#sec-maketime'
},
max: {
url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions'
},
min: {
url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions'
},
MinFromTime: {
url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds'
},
ModuleNamespaceCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-modulenamespacecreate'
},
modulo: {
url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions'
},
MonthFromTime: {
url: 'https://262.ecma-international.org/6.0/#sec-month-number'
},
msFromTime: {
url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds'
},
msPerDay: {
url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day'
},
NewDeclarativeEnvironment: {
url: 'https://262.ecma-international.org/6.0/#sec-newdeclarativeenvironment'
},
NewFunctionEnvironment: {
url: 'https://262.ecma-international.org/6.0/#sec-newfunctionenvironment'
},
NewGlobalEnvironment: {
url: 'https://262.ecma-international.org/6.0/#sec-newglobalenvironment'
},
NewModuleEnvironment: {
url: 'https://262.ecma-international.org/6.0/#sec-newmoduleenvironment'
},
NewObjectEnvironment: {
url: 'https://262.ecma-international.org/6.0/#sec-newobjectenvironment'
},
NewPromiseCapability: {
url: 'https://262.ecma-international.org/6.0/#sec-newpromisecapability'
},
NormalCompletion: {
url: 'https://262.ecma-international.org/6.0/#sec-normalcompletion'
},
ObjectCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-objectcreate'
},
ObjectDefineProperties: {
url: 'https://262.ecma-international.org/6.0/#sec-objectdefineproperties'
},
OrdinaryCallBindThis: {
url: 'https://262.ecma-international.org/6.0/#sec-ordinarycallbindthis'
},
OrdinaryCallEvaluateBody: {
url: 'https://262.ecma-international.org/6.0/#sec-ordinarycallevaluatebody'
},
OrdinaryCreateFromConstructor: {
url: 'https://262.ecma-international.org/6.0/#sec-ordinarycreatefromconstructor'
},
OrdinaryDefineOwnProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-ordinarydefineownproperty'
},
OrdinaryGetOwnProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-ordinarygetownproperty'
},
OrdinaryHasInstance: {
url: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasinstance'
},
OrdinaryHasProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-ordinaryhasproperty'
},
ParseModule: {
url: 'https://262.ecma-international.org/6.0/#sec-parsemodule'
},
PerformEval: {
url: 'https://262.ecma-international.org/6.0/#sec-performeval'
},
PerformPromiseAll: {
url: 'https://262.ecma-international.org/6.0/#sec-performpromiseall'
},
PerformPromiseRace: {
url: 'https://262.ecma-international.org/6.0/#sec-performpromiserace'
},
PerformPromiseThen: {
url: 'https://262.ecma-international.org/6.0/#sec-performpromisethen'
},
PrepareForOrdinaryCall: {
url: 'https://262.ecma-international.org/6.0/#sec-prepareforordinarycall'
},
PrepareForTailCall: {
url: 'https://262.ecma-international.org/6.0/#sec-preparefortailcall'
},
ProxyCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-proxycreate'
},
PutValue: {
url: 'https://262.ecma-international.org/6.0/#sec-putvalue'
},
QuoteJSONString: {
url: 'https://262.ecma-international.org/6.0/#sec-quotejsonstring'
},
RegExpAlloc: {
url: 'https://262.ecma-international.org/6.0/#sec-regexpalloc'
},
RegExpBuiltinExec: {
url: 'https://262.ecma-international.org/6.0/#sec-regexpbuiltinexec'
},
RegExpCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-regexpcreate'
},
RegExpExec: {
url: 'https://262.ecma-international.org/6.0/#sec-regexpexec'
},
RegExpInitialize: {
url: 'https://262.ecma-international.org/6.0/#sec-regexpinitialize'
},
RejectPromise: {
url: 'https://262.ecma-international.org/6.0/#sec-rejectpromise'
},
RepeatMatcher: {
url: 'https://262.ecma-international.org/6.0/#sec-runtime-semantics-repeatmatcher-abstract-operation'
},
RequireObjectCoercible: {
url: 'https://262.ecma-international.org/6.0/#sec-requireobjectcoercible'
},
ResolveBinding: {
url: 'https://262.ecma-international.org/6.0/#sec-resolvebinding'
},
ResolveThisBinding: {
url: 'https://262.ecma-international.org/6.0/#sec-resolvethisbinding'
},
SameValue: {
url: 'https://262.ecma-international.org/6.0/#sec-samevalue'
},
SameValueZero: {
url: 'https://262.ecma-international.org/6.0/#sec-samevaluezero'
},
SecFromTime: {
url: 'https://262.ecma-international.org/6.0/#sec-hours-minutes-second-and-milliseconds'
},
SerializeJSONArray: {
url: 'https://262.ecma-international.org/6.0/#sec-serializejsonarray'
},
SerializeJSONObject: {
url: 'https://262.ecma-international.org/6.0/#sec-serializejsonobject'
},
SerializeJSONProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-serializejsonproperty'
},
Set: {
url: 'https://262.ecma-international.org/6.0/#sec-set-o-p-v-throw'
},
SetDefaultGlobalBindings: {
url: 'https://262.ecma-international.org/6.0/#sec-setdefaultglobalbindings'
},
SetFunctionName: {
url: 'https://262.ecma-international.org/6.0/#sec-setfunctionname'
},
SetIntegrityLevel: {
url: 'https://262.ecma-international.org/6.0/#sec-setintegritylevel'
},
SetRealmGlobalObject: {
url: 'https://262.ecma-international.org/6.0/#sec-setrealmglobalobject'
},
SetValueInBuffer: {
url: 'https://262.ecma-international.org/6.0/#sec-setvalueinbuffer'
},
SetViewValue: {
url: 'https://262.ecma-international.org/6.0/#sec-setviewvalue'
},
sign: {
url: 'https://262.ecma-international.org/6.0/#sec-algorithm-conventions'
},
SortCompare: {
url: 'https://262.ecma-international.org/6.0/#sec-sortcompare'
},
SpeciesConstructor: {
url: 'https://262.ecma-international.org/6.0/#sec-speciesconstructor'
},
SplitMatch: {
url: 'https://262.ecma-international.org/6.0/#sec-splitmatch'
},
'Strict Equality Comparison': {
url: 'https://262.ecma-international.org/6.0/#sec-strict-equality-comparison'
},
StringCreate: {
url: 'https://262.ecma-international.org/6.0/#sec-stringcreate'
},
StringGetIndexProperty: {
url: 'https://262.ecma-international.org/6.0/#sec-stringgetindexproperty'
},
SymbolDescriptiveString: {
url: 'https://262.ecma-international.org/6.0/#sec-symboldescriptivestring'
},
TestIntegrityLevel: {
url: 'https://262.ecma-international.org/6.0/#sec-testintegritylevel'
},
thisBooleanValue: {
url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-boolean-prototype-object'
},
thisNumberValue: {
url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-number-prototype-object'
},
thisStringValue: {
url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-string-prototype-object'
},
thisTimeValue: {
url: 'https://262.ecma-international.org/6.0/#sec-properties-of-the-date-prototype-object'
},
TimeClip: {
url: 'https://262.ecma-international.org/6.0/#sec-timeclip'
},
TimeFromYear: {
url: 'https://262.ecma-international.org/6.0/#sec-year-number'
},
TimeWithinDay: {
url: 'https://262.ecma-international.org/6.0/#sec-day-number-and-time-within-day'
},
ToBoolean: {
url: 'https://262.ecma-international.org/6.0/#sec-toboolean'
},
ToDateString: {
url: 'https://262.ecma-international.org/6.0/#sec-todatestring'
},
ToInt16: {
url: 'https://262.ecma-international.org/6.0/#sec-toint16'
},
ToInt32: {
url: 'https://262.ecma-international.org/6.0/#sec-toint32'
},
ToInt8: {
url: 'https://262.ecma-international.org/6.0/#sec-toint8'
},
ToInteger: {
url: 'https://262.ecma-international.org/6.0/#sec-tointeger'
},
ToLength: {
url: 'https://262.ecma-international.org/6.0/#sec-tolength'
},
ToNumber: {
url: 'https://262.ecma-international.org/6.0/#sec-tonumber'
},
ToObject: {
url: 'https://262.ecma-international.org/6.0/#sec-toobject'
},
ToPrimitive: {
url: 'https://262.ecma-international.org/6.0/#sec-toprimitive'
},
ToPropertyDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-topropertydescriptor'
},
ToPropertyKey: {
url: 'https://262.ecma-international.org/6.0/#sec-topropertykey'
},
ToString: {
url: 'https://262.ecma-international.org/6.0/#sec-tostring'
},
ToUint16: {
url: 'https://262.ecma-international.org/6.0/#sec-touint16'
},
ToUint32: {
url: 'https://262.ecma-international.org/6.0/#sec-touint32'
},
ToUint8: {
url: 'https://262.ecma-international.org/6.0/#sec-touint8'
},
ToUint8Clamp: {
url: 'https://262.ecma-international.org/6.0/#sec-touint8clamp'
},
TriggerPromiseReactions: {
url: 'https://262.ecma-international.org/6.0/#sec-triggerpromisereactions'
},
Type: {
url: 'https://262.ecma-international.org/6.0/#sec-ecmascript-data-types-and-values'
},
TypedArrayFrom: {
url: 'https://262.ecma-international.org/6.0/#sec-typedarrayfrom'
},
UpdateEmpty: {
url: 'https://262.ecma-international.org/6.0/#sec-updateempty'
},
UTC: {
url: 'https://262.ecma-international.org/6.0/#sec-utc-t'
},
ValidateAndApplyPropertyDescriptor: {
url: 'https://262.ecma-international.org/6.0/#sec-validateandapplypropertydescriptor'
},
ValidateTypedArray: {
url: 'https://262.ecma-international.org/6.0/#sec-validatetypedarray'
},
WeekDay: {
url: 'https://262.ecma-international.org/6.0/#sec-week-day'
},
YearFromTime: {
url: 'https://262.ecma-international.org/6.0/#sec-year-number'
}
};

View File

@@ -0,0 +1,9 @@
import { Observable } from '../Observable';
export const EMPTY = new Observable((subscriber) => subscriber.complete());
export function empty(scheduler) {
return scheduler ? emptyScheduled(scheduler) : EMPTY;
}
function emptyScheduled(scheduler) {
return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));
}
//# sourceMappingURL=empty.js.map

View File

@@ -0,0 +1,30 @@
import * as fsScandir from '@nodelib/fs.scandir';
import type { Entry, Errno } from './types';
export declare type FilterFunction<T> = (value: T) => boolean;
export declare type DeepFilterFunction = FilterFunction<Entry>;
export declare type EntryFilterFunction = FilterFunction<Entry>;
export declare type ErrorFilterFunction = FilterFunction<Errno>;
export interface Options {
basePath?: string;
concurrency?: number;
deepFilter?: DeepFilterFunction;
entryFilter?: EntryFilterFunction;
errorFilter?: ErrorFilterFunction;
followSymbolicLinks?: boolean;
fs?: Partial<fsScandir.FileSystemAdapter>;
pathSegmentSeparator?: string;
stats?: boolean;
throwErrorOnBrokenSymbolicLink?: boolean;
}
export default class Settings {
private readonly _options;
readonly basePath?: string;
readonly concurrency: number;
readonly deepFilter: DeepFilterFunction | null;
readonly entryFilter: EntryFilterFunction | null;
readonly errorFilter: ErrorFilterFunction | null;
readonly pathSegmentSeparator: string;
readonly fsScandirSettings: fsScandir.Settings;
constructor(_options?: Options);
private _getValue;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"ca-file.spec.js","sourceRoot":"","sources":["../ca-file.spec.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,uCAA2C;AAE3C,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;IAC7B,MAAM,CAAC,IAAA,wBAAc,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;QAClF;;0BAEsB;QACtB;;0BAEsB;QACtB;;0BAEsB;KACvB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;IACtD,MAAM,CAAC,IAAA,wBAAc,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;AACnF,CAAC,CAAC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"first.js","sourceRoot":"","sources":["../../../../src/internal/operators/first.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAEhD,mCAAkC;AAClC,+BAA8B;AAC9B,mDAAkD;AAClD,+CAA8C;AAC9C,6CAA4C;AAyE5C,SAAgB,KAAK,CACnB,SAAgF,EAChF,YAAgB;IAEhB,IAAM,eAAe,GAAG,SAAS,CAAC,MAAM,IAAI,CAAC,CAAC;IAC9C,OAAO,UAAC,MAAqB;QAC3B,OAAA,MAAM,CAAC,IAAI,CACT,SAAS,CAAC,CAAC,CAAC,eAAM,CAAC,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,EAAvB,CAAuB,CAAC,CAAC,CAAC,CAAC,mBAAQ,EAChE,WAAI,CAAC,CAAC,CAAC,EACP,eAAe,CAAC,CAAC,CAAC,+BAAc,CAAC,YAAa,CAAC,CAAC,CAAC,CAAC,2BAAY,CAAC,cAAM,OAAA,IAAI,uBAAU,EAAE,EAAhB,CAAgB,CAAC,CACvF;IAJD,CAIC,CAAC;AACN,CAAC;AAXD,sBAWC"}

View File

@@ -0,0 +1,113 @@
import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';
export { get_store_value as get } from '../internal/index.mjs';
const subscriber_queue = [];
/**
* Creates a `Readable` store that allows reading by subscription.
* @param value initial value
* @param {StartStopNotifier}start start and stop notifications for subscriptions
*/
function readable(value, start) {
return {
subscribe: writable(value, start).subscribe
};
}
/**
* Create a `Writable` store that allows both updating and reading by subscription.
* @param {*=}value initial value
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
*/
function writable(value, start = noop) {
let stop;
const subscribers = new Set();
function set(new_value) {
if (safe_not_equal(value, new_value)) {
value = new_value;
if (stop) { // store is ready
const run_queue = !subscriber_queue.length;
for (const subscriber of subscribers) {
subscriber[1]();
subscriber_queue.push(subscriber, value);
}
if (run_queue) {
for (let i = 0; i < subscriber_queue.length; i += 2) {
subscriber_queue[i][0](subscriber_queue[i + 1]);
}
subscriber_queue.length = 0;
}
}
}
}
function update(fn) {
set(fn(value));
}
function subscribe(run, invalidate = noop) {
const subscriber = [run, invalidate];
subscribers.add(subscriber);
if (subscribers.size === 1) {
stop = start(set) || noop;
}
run(value);
return () => {
subscribers.delete(subscriber);
if (subscribers.size === 0 && stop) {
stop();
stop = null;
}
};
}
return { set, update, subscribe };
}
function derived(stores, fn, initial_value) {
const single = !Array.isArray(stores);
const stores_array = single
? [stores]
: stores;
const auto = fn.length < 2;
return readable(initial_value, (set) => {
let inited = false;
const values = [];
let pending = 0;
let cleanup = noop;
const sync = () => {
if (pending) {
return;
}
cleanup();
const result = fn(single ? values[0] : values, set);
if (auto) {
set(result);
}
else {
cleanup = is_function(result) ? result : noop;
}
};
const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {
values[i] = value;
pending &= ~(1 << i);
if (inited) {
sync();
}
}, () => {
pending |= (1 << i);
}));
inited = true;
sync();
return function stop() {
run_all(unsubscribers);
cleanup();
};
});
}
/**
* Takes a store and returns a new one derived from the old one that is readable.
*
* @param store - store to make readonly
*/
function readonly(store) {
return {
subscribe: store.subscribe.bind(store)
};
}
export { derived, readable, readonly, writable };

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0.0051,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0.0051,"46":0,"47":0,"48":0,"49":0,"50":0.01531,"51":0,"52":0.01531,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0.0102,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.0102,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.03061,"79":0,"80":0,"81":0,"82":0,"83":0.0102,"84":0,"85":0,"86":0,"87":0,"88":0.0051,"89":0.0051,"90":0,"91":0.06122,"92":0,"93":0.0051,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0.0051,"101":0.0051,"102":0.83163,"103":0.02551,"104":0.0051,"105":0.0051,"106":0.03061,"107":0.11735,"108":0.12245,"109":1.63264,"110":1.21428,"111":0.0051,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0.0051,"46":0,"47":0,"48":0,"49":0.0102,"50":0,"51":0,"52":0,"53":0.0102,"54":0,"55":0,"56":0,"57":0,"58":0.0051,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0.19388,"73":0,"74":0.01531,"75":0.0051,"76":0,"77":0,"78":0.0051,"79":0.03061,"80":0.0102,"81":0.0051,"83":0.0102,"84":0.0051,"85":0.21939,"86":0.02041,"87":0.02041,"88":0.0051,"89":0,"90":0.0102,"91":0.01531,"92":0.0051,"93":0.0102,"94":0,"95":0.0051,"96":0.0051,"97":0.02041,"98":0.01531,"99":0.0051,"100":0.10714,"101":0.02551,"102":0.05102,"103":0.05612,"104":0.04082,"105":0.04592,"106":0.02041,"107":0.10714,"108":0.29081,"109":6.29077,"110":4.51527,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.06633,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.0051,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0.0051,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.02551,"94":0.35204,"95":0.21428,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0.04082,"97":0,"98":0.01531,"99":0,"100":0,"101":0.0051,"102":0,"103":0.0051,"104":0.0051,"105":0.0051,"106":0.0102,"107":0.0102,"108":0.2653,"109":1.29591,"110":1.69897},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.02551,"14":0.05612,"15":0.01531,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0.13775,"13.1":0.19388,"14.1":0.31122,"15.1":0.03061,"15.2-15.3":0.03061,"15.4":0.09694,"15.5":0.31122,"15.6":0.82652,"16.0":0.18367,"16.1":0.47449,"16.2":1.13264,"16.3":0.88775,"16.4":0},G:{"8":0.00336,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.18125,"5.0-5.1":0,"6.0-6.1":0.00336,"7.0-7.1":0,"8.1-8.4":0.00336,"9.0-9.2":0.56389,"9.3":0.02014,"10.0-10.2":0,"10.3":0.05035,"11.0-11.2":0.02014,"11.3-11.4":0.00671,"12.0-12.1":0.11076,"12.2-12.5":0.33565,"13.0-13.1":0,"13.2":0.01007,"13.3":0.0235,"13.4-13.7":0.10405,"14.0-14.4":0.23495,"14.5-14.8":0.56053,"15.0-15.1":0.19132,"15.2-15.3":0.23495,"15.4":0.31215,"15.5":0.66458,"15.6":2.63819,"16.0":3.95057,"16.1":8.1193,"16.2":8.31733,"16.3":5.60195,"16.4":0.02014},P:{"4":0.17353,"20":1.50048,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.02041,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0,"12.0":0,"13.0":0.01021,"14.0":0.04083,"15.0":0.01021,"16.0":0.03062,"17.0":0.03062,"18.0":0.06124,"19.0":2.01085},I:{"0":0,"3":0.05707,"4":0.00116,"2.1":0.02912,"2.2":0.08386,"2.3":0.00116,"4.1":0.06289,"4.2-4.3":0.06872,"4.4":0,"4.4.3-4.4.4":0.21663},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0.03673,"9":0,"10":0.01224,"11":0.07347,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.9894},H:{"0":0.48226},L:{"0":30.28254},R:{_:"0"},M:{"0":0.85225},Q:{"13.1":1.19021}};

View File

@@ -0,0 +1,153 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for CSVError.ts</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="prettify.css" />
<link rel="stylesheet" href="base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="index.html">All files</a> CSVError.ts
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">94.12% </span>
<span class="quiet">Statements</span>
<span class='fraction'>16/17</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">75% </span>
<span class="quiet">Branches</span>
<span class='fraction'>3/4</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">83.33% </span>
<span class="quiet">Functions</span>
<span class='fraction'>5/6</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">93.75% </span>
<span class="quiet">Lines</span>
<span class='fraction'>15/16</span>
</div>
</div>
<p class="quiet">
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
</p>
</div>
<div class='status-line high'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
<a name='L2'></a><a href='#L2'>2</a>
<a name='L3'></a><a href='#L3'>3</a>
<a name='L4'></a><a href='#L4'>4</a>
<a name='L5'></a><a href='#L5'>5</a>
<a name='L6'></a><a href='#L6'>6</a>
<a name='L7'></a><a href='#L7'>7</a>
<a name='L8'></a><a href='#L8'>8</a>
<a name='L9'></a><a href='#L9'>9</a>
<a name='L10'></a><a href='#L10'>10</a>
<a name='L11'></a><a href='#L11'>11</a>
<a name='L12'></a><a href='#L12'>12</a>
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a>
<a name='L19'></a><a href='#L19'>19</a>
<a name='L20'></a><a href='#L20'>20</a>
<a name='L21'></a><a href='#L21'>21</a>
<a name='L22'></a><a href='#L22'>22</a>
<a name='L23'></a><a href='#L23'>23</a>
<a name='L24'></a><a href='#L24'>24</a>
<a name='L25'></a><a href='#L25'>25</a>
<a name='L26'></a><a href='#L26'>26</a>
<a name='L27'></a><a href='#L27'>27</a>
<a name='L28'></a><a href='#L28'>28</a>
<a name='L29'></a><a href='#L29'>29</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">2x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">5x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-yes">8x</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">var util = require("util");
export default class CSVError extends Error {
static column_mismatched(index: number, extra?: string) {
return new CSVError("column_mismatched", index, extra);
}
static unclosed_quote(index: number, extra?: string) {
return new CSVError("unclosed_quote", index, extra);
}
static fromJSON(obj) {
return new CSVError(obj.err, obj.line, obj.extra);
}
constructor(
public err: string,
public line: number,
public extra?: string
) {
super("Error: " + err + ". JSON Line number: " + line + (extra ? " near: " + extra : ""))<span class="branch-1 cbranch-no" title="branch not covered" >;</span>
this.name = "CSV Parse Error";
}
<span class="fstat-no" title="function not covered" > toJSON() {</span>
<span class="cstat-no" title="statement not covered" > return {</span>
err: this.err,
line: this.line,
extra: this.extra
}
}
&nbsp;
}
&nbsp;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Thu May 17 2018 01:25:26 GMT+0100 (IST)
</div>
</div>
<script src="prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="sorter.js"></script>
<script src="block-navigation.js"></script>
</body>
</html>

View File

@@ -0,0 +1,18 @@
This software is released under the MIT license:
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.

View File

@@ -0,0 +1,23 @@
"use strict";
module.exports = {
"@@iterator": require("./@@iterator"),
"at": require("./at"),
"count": require("./count"),
"camelToHyphen": require("./camel-to-hyphen"),
"capitalize": require("./capitalize"),
"caseInsensitiveCompare": require("./case-insensitive-compare"),
"codePointAt": require("./code-point-at"),
"contains": require("./contains"),
"hyphenToCamel": require("./hyphen-to-camel"),
"endsWith": require("./ends-with"),
"indent": require("./indent"),
"last": require("./last"),
"normalize": require("./normalize"),
"pad": require("./pad"),
"plainReplace": require("./plain-replace"),
"plainReplaceAll": require("./plain-replace-all"),
"repeat": require("./repeat"),
"startsWith": require("./starts-with"),
"uncapitalize": require("./uncapitalize")
};

View File

@@ -0,0 +1,16 @@
import { OperatorFunction } from "../types";
import { map } from "../operators/map";
const { isArray } = Array;
function callOrApply<T, R>(fn: ((...values: T[]) => R), args: T|T[]): R {
return isArray(args) ? fn(...args) : fn(args);
}
/**
* Used in several -- mostly deprecated -- situations where we need to
* apply a list of arguments or a single argument to a result selector.
*/
export function mapOneOrManyArgs<T, R>(fn: ((...values: T[]) => R)): OperatorFunction<T|T[], R> {
return map(args => callOrApply(fn, args))
}

View File

@@ -0,0 +1,42 @@
"use strict"
// external tooling
const resolve = require("resolve")
const moduleDirectories = ["web_modules", "node_modules"]
function resolveModule(id, opts) {
return new Promise((res, rej) => {
resolve(id, opts, (err, path) => (err ? rej(err) : res(path)))
})
}
module.exports = function (id, base, options) {
const paths = options.path
const resolveOpts = {
basedir: base,
moduleDirectory: moduleDirectories.concat(options.addModulesDirectories),
paths,
extensions: [".css"],
packageFilter: function processPackage(pkg) {
if (pkg.style) pkg.main = pkg.style
else if (!pkg.main || !/\.css$/.test(pkg.main)) pkg.main = "index.css"
return pkg
},
preserveSymlinks: false,
}
return resolveModule(`./${id}`, resolveOpts)
.catch(() => resolveModule(id, resolveOpts))
.catch(() => {
if (paths.indexOf(base) === -1) paths.unshift(base)
throw new Error(
`Failed to find '${id}'
in [
${paths.join(",\n ")}
]`
)
})
}

View File

@@ -0,0 +1,10 @@
'use strict';
var $BigInt = typeof BigInt !== 'undefined' && BigInt;
module.exports = function hasNativeBigInts() {
return typeof $BigInt === 'function'
&& typeof BigInt === 'function'
&& typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers
&& typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers
};

View File

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

View File

@@ -0,0 +1 @@
module.exports={C:{"2":0,"3":0,"4":0.00471,"5":0,"6":0,"7":0,"8":0.00471,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0.06595,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0.00471,"44":0,"45":0.00471,"46":0,"47":0.00471,"48":0,"49":0.00471,"50":0,"51":0,"52":0.23555,"53":0,"54":0.34861,"55":0,"56":0.00942,"57":0,"58":0,"59":0,"60":0.00942,"61":0.01884,"62":0.00471,"63":0,"64":0,"65":0.00471,"66":0.00471,"67":0.00471,"68":0.01413,"69":0,"70":0.00471,"71":0,"72":0.00471,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.01413,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00942,"89":0.00471,"90":0.00471,"91":0.00942,"92":0,"93":0.00471,"94":0.00471,"95":0.00471,"96":0,"97":0,"98":0.00471,"99":0.01413,"100":0.00471,"101":0.00471,"102":0.03298,"103":0.00942,"104":0.02356,"105":0.02356,"106":0.02827,"107":0.02827,"108":0.0424,"109":0.75847,"110":0.48052,"111":0.00471,"112":0,"3.5":0,"3.6":0},D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00471,"41":0,"42":0.00942,"43":0,"44":0.00471,"45":0,"46":0.00471,"47":0.00471,"48":0,"49":0.19786,"50":0.00471,"51":0,"52":0.00471,"53":0,"54":0,"55":0,"56":0.00942,"57":0,"58":0.00471,"59":0,"60":0,"61":0,"62":0,"63":0.00942,"64":0.00471,"65":0.03769,"66":0.00942,"67":0.00471,"68":0.00942,"69":0.00471,"70":0.00942,"71":0.00471,"72":0.00471,"73":0.01413,"74":0.00471,"75":0.01413,"76":0.01413,"77":0.00942,"78":0.00471,"79":0.02827,"80":0.00471,"81":0.00942,"83":0.02356,"84":0.00942,"85":0.01884,"86":0.01884,"87":0.02356,"88":0.01884,"89":0.00942,"90":0.01884,"91":0.01884,"92":0.01413,"93":0.02356,"94":0.01884,"95":0.01884,"96":0.0424,"97":0.04711,"98":0.05182,"99":0.03298,"100":0.06124,"101":0.04711,"102":0.05182,"103":0.09893,"104":0.0424,"105":0.07538,"106":0.0848,"107":0.13191,"108":0.39572,"109":8.23483,"110":2.83131,"111":0.00471,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00471,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0.00471,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0.00471,"64":0,"65":0,"66":0,"67":0.04711,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0.00471,"75":0,"76":0,"77":0,"78":0,"79":0.00942,"80":0,"81":0,"82":0,"83":0,"84":0.00471,"85":0.00942,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00471,"93":0.06595,"94":0.4711,"95":0.32035,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0.00471,"13":0,"14":0.00471,"15":0.00471,"16":0,"17":0,"18":0.00471,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00471,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0.00471,"106":0.00471,"107":0.01413,"108":0.00942,"109":0.39101,"110":0.45697},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00471,"15":0.00942,_:"0","3.1":0,"3.2":0,"5.1":0.00471,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.00942,"14.1":0.02356,"15.1":0.00471,"15.2-15.3":0.00471,"15.4":0.00471,"15.5":0.00942,"15.6":0.06595,"16.0":0.01884,"16.1":0.02827,"16.2":0.03769,"16.3":0.03769,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00234,"6.0-6.1":0.0014,"7.0-7.1":0.01403,"8.1-8.4":0.01637,"9.0-9.2":0.00187,"9.3":0.10288,"10.0-10.2":0.00281,"10.3":0.07856,"11.0-11.2":0.00374,"11.3-11.4":0.00935,"12.0-12.1":0.00748,"12.2-12.5":0.32546,"13.0-13.1":0.00935,"13.2":0.0014,"13.3":0.01169,"13.4-13.7":0.02665,"14.0-14.4":0.06406,"14.5-14.8":0.12485,"15.0-15.1":0.0304,"15.2-15.3":0.04536,"15.4":0.05752,"15.5":0.09773,"15.6":0.31471,"16.0":0.47791,"16.1":0.86276,"16.2":0.97733,"16.3":0.58266,"16.4":0.00374},P:{"4":0.22399,"20":0.24532,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.08533,"8.2":0,"9.2":0.01067,"10.1":0,"11.1-11.2":0.02133,"12.0":0,"13.0":0.032,"14.0":0.01067,"15.0":0.01067,"16.0":0.02133,"17.0":0.10666,"18.0":0.032,"19.0":0.47998},I:{"0":0,"3":0,"4":0.00488,"2.1":0,"2.2":0,"2.3":0.00244,"4.1":0.02686,"4.2-4.3":0.0415,"4.4":0,"4.4.3-4.4.4":0.50782},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0.00471,"10":0,"11":0.02827,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0.00529,_:"3.0-3.1"},J:{"7":0,"10":0.00529},O:{"0":0.02645},H:{"0":0.50073},L:{"0":74.1354},R:{_:"0"},M:{"0":0.12694},Q:{"13.1":0}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"partition.js","sourceRoot":"","sources":["../../../../src/internal/operators/partition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAuDlC,MAAM,UAAU,SAAS,CACvB,SAA+C,EAC/C,OAAa;IAEb,OAAO,CAAC,MAAqB,EAAE,EAAE,CAC/B,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAmC,CAAC;AACpH,CAAC"}

View File

@@ -0,0 +1,35 @@
export declare function fromBig(n: bigint, le?: boolean): {
h: number;
l: number;
};
export declare function split(lst: bigint[], le?: boolean): Uint32Array[];
export declare const toBig: (h: number, l: number) => bigint;
export declare function add(Ah: number, Al: number, Bh: number, Bl: number): {
h: number;
l: number;
};
declare const u64: {
fromBig: typeof fromBig;
split: typeof split;
toBig: (h: number, l: number) => bigint;
shrSH: (h: number, l: number, s: number) => number;
shrSL: (h: number, l: number, s: number) => number;
rotrSH: (h: number, l: number, s: number) => number;
rotrSL: (h: number, l: number, s: number) => number;
rotrBH: (h: number, l: number, s: number) => number;
rotrBL: (h: number, l: number, s: number) => number;
rotr32H: (h: number, l: number) => number;
rotr32L: (h: number, l: number) => number;
rotlSH: (h: number, l: number, s: number) => number;
rotlSL: (h: number, l: number, s: number) => number;
rotlBH: (h: number, l: number, s: number) => number;
rotlBL: (h: number, l: number, s: number) => number;
add: typeof add;
add3L: (Al: number, Bl: number, Cl: number) => number;
add3H: (low: number, Ah: number, Bh: number, Ch: number) => number;
add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number;
add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number;
add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number;
add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number;
};
export default u64;

View File

@@ -0,0 +1,4 @@
// Determine if version is greater than all the versions possible in the range.
const outside = require('./outside')
const gtr = (version, range, options) => outside(version, range, '>', options)
module.exports = gtr

View File

@@ -0,0 +1,37 @@
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function() {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
module.exports = shortOut;

View File

@@ -0,0 +1,33 @@
"use strict";
module.exports = [
"000000", "800000", "008000", "808000", "000080", "800080", "008080", "c0c0c0", "808080",
"ff0000", "00ff00", "ffff00", "0000ff", "ff00ff", "00ffff", "ffffff", "000000", "00005f",
"000087", "0000af", "0000d7", "0000ff", "005f00", "005f5f", "005f87", "005faf", "005fd7",
"005fff", "008700", "00875f", "008787", "0087af", "0087d7", "0087ff", "00af00", "00af5f",
"00af87", "00afaf", "00afd7", "00afff", "00d700", "00d75f", "00d787", "00d7af", "00d7d7",
"00d7ff", "00ff00", "00ff5f", "00ff87", "00ffaf", "00ffd7", "00ffff", "5f0000", "5f005f",
"5f0087", "5f00af", "5f00d7", "5f00ff", "5f5f00", "5f5f5f", "5f5f87", "5f5faf", "5f5fd7",
"5f5fff", "5f8700", "5f875f", "5f8787", "5f87af", "5f87d7", "5f87ff", "5faf00", "5faf5f",
"5faf87", "5fafaf", "5fafd7", "5fafff", "5fd700", "5fd75f", "5fd787", "5fd7af", "5fd7d7",
"5fd7ff", "5fff00", "5fff5f", "5fff87", "5fffaf", "5fffd7", "5fffff", "870000", "87005f",
"870087", "8700af", "8700d7", "8700ff", "875f00", "875f5f", "875f87", "875faf", "875fd7",
"875fff", "878700", "87875f", "878787", "8787af", "8787d7", "8787ff", "87af00", "87af5f",
"87af87", "87afaf", "87afd7", "87afff", "87d700", "87d75f", "87d787", "87d7af", "87d7d7",
"87d7ff", "87ff00", "87ff5f", "87ff87", "87ffaf", "87ffd7", "87ffff", "af0000", "af005f",
"af0087", "af00af", "af00d7", "af00ff", "af5f00", "af5f5f", "af5f87", "af5faf", "af5fd7",
"af5fff", "af8700", "af875f", "af8787", "af87af", "af87d7", "af87ff", "afaf00", "afaf5f",
"afaf87", "afafaf", "afafd7", "afafff", "afd700", "afd75f", "afd787", "afd7af", "afd7d7",
"afd7ff", "afff00", "afff5f", "afff87", "afffaf", "afffd7", "afffff", "d70000", "d7005f",
"d70087", "d700af", "d700d7", "d700ff", "d75f00", "d75f5f", "d75f87", "d75faf", "d75fd7",
"d75fff", "d78700", "d7875f", "d78787", "d787af", "d787d7", "d787ff", "d7af00", "d7af5f",
"d7af87", "d7afaf", "d7afd7", "d7afff", "d7d700", "d7d75f", "d7d787", "d7d7af", "d7d7d7",
"d7d7ff", "d7ff00", "d7ff5f", "d7ff87", "d7ffaf", "d7ffd7", "d7ffff", "ff0000", "ff005f",
"ff0087", "ff00af", "ff00d7", "ff00ff", "ff5f00", "ff5f5f", "ff5f87", "ff5faf", "ff5fd7",
"ff5fff", "ff8700", "ff875f", "ff8787", "ff87af", "ff87d7", "ff87ff", "ffaf00", "ffaf5f",
"ffaf87", "ffafaf", "ffafd7", "ffafff", "ffd700", "ffd75f", "ffd787", "ffd7af", "ffd7d7",
"ffd7ff", "ffff00", "ffff5f", "ffff87", "ffffaf", "ffffd7", "ffffff", "080808", "121212",
"1c1c1c", "262626", "303030", "3a3a3a", "444444", "4e4e4e", "585858", "626262", "6c6c6c",
"767676", "808080", "8a8a8a", "949494", "9e9e9e", "a8a8a8", "b2b2b2", "bcbcbc", "c6c6c6",
"d0d0d0", "dadada", "e4e4e4", "eeeeee"
];

View File

@@ -0,0 +1,2 @@
// @generated from regex-gen.ts
export var S_UNICODE_REGEX = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BF\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDE8\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEE0-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDD78\uDD7A-\uDDCB\uDDCD-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6\uDF00-\uDF92\uDF94-\uDFCA]/;

View File

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

View File

@@ -0,0 +1,13 @@
Copyright (C) 2012-present SheetJS
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,164 @@
# tslib
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
This library is primarily used by the `--importHelpers` flag in TypeScript.
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
```ts
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
exports.x = {};
exports.y = __assign({}, exports.x);
```
will instead be emitted as something like the following:
```ts
var tslib_1 = require("tslib");
exports.x = {};
exports.y = tslib_1.__assign({}, exports.x);
```
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
# Installing
For the latest stable version, run:
## npm
```sh
# TypeScript 3.9.2 or later
npm install tslib
# TypeScript 3.8.4 or earlier
npm install tslib@^1
# TypeScript 2.3.2 or earlier
npm install tslib@1.6.1
```
## yarn
```sh
# TypeScript 3.9.2 or later
yarn add tslib
# TypeScript 3.8.4 or earlier
yarn add tslib@^1
# TypeScript 2.3.2 or earlier
yarn add tslib@1.6.1
```
## bower
```sh
# TypeScript 3.9.2 or later
bower install tslib
# TypeScript 3.8.4 or earlier
bower install tslib@^1
# TypeScript 2.3.2 or earlier
bower install tslib@1.6.1
```
## JSPM
```sh
# TypeScript 3.9.2 or later
jspm install tslib
# TypeScript 3.8.4 or earlier
jspm install tslib@^1
# TypeScript 2.3.2 or earlier
jspm install tslib@1.6.1
```
# Usage
Set the `importHelpers` compiler option on the command line:
```
tsc --importHelpers file.ts
```
or in your tsconfig.json:
```json
{
"compilerOptions": {
"importHelpers": true
}
}
```
#### For bower and JSPM users
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
```json
{
"compilerOptions": {
"module": "amd",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["bower_components/tslib/tslib.d.ts"]
}
}
}
```
For JSPM users:
```json
{
"compilerOptions": {
"module": "system",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"]
}
}
}
```
## Deployment
- Choose your new version number
- Set it in `package.json` and `bower.json`
- Create a tag: `git tag [version]`
- Push the tag: `git push --tags`
- Create a [release in GitHub](https://github.com/microsoft/tslib/releases)
- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow
Done.
# Contribute
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
# Documentation
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
* [Programming handbook](http://www.typescriptlang.org/Handbook)
* [Homepage](http://www.typescriptlang.org/)

View File

@@ -0,0 +1,10 @@
"use strict";
module.exports = function (value) {
try {
return value.toString();
} catch (error) {
try { return String(value); }
catch (error2) { return null; }
}
};

View File

@@ -0,0 +1,3 @@
"use strict";
module.exports = require("./is-implemented")() ? String.prototype.codePointAt : require("./shim");

View File

@@ -0,0 +1,200 @@
import { PartialObserver } from '../types';
/**
* Valid Ajax direction types. Prefixes the event `type` in the
* {@link AjaxResponse} object with "upload_" for events related
* to uploading and "download_" for events related to downloading.
*/
export declare type AjaxDirection = 'upload' | 'download';
export declare type ProgressEventType = 'loadstart' | 'progress' | 'load';
export declare type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`;
/**
* The object containing values RxJS used to make the HTTP request.
*
* This is provided in {@link AjaxError} instances as the `request`
* object.
*/
export interface AjaxRequest {
/**
* The URL requested.
*/
url: string;
/**
* The body to send over the HTTP request.
*/
body?: any;
/**
* The HTTP method used to make the HTTP request.
*/
method: string;
/**
* Whether or not the request was made asynchronously.
*/
async: boolean;
/**
* The headers sent over the HTTP request.
*/
headers: Readonly<Record<string, any>>;
/**
* The timeout value used for the HTTP request.
* Note: this is only honored if the request is asynchronous (`async` is `true`).
*/
timeout: number;
/**
* The user credentials user name sent with the HTTP request.
*/
user?: string;
/**
* The user credentials password sent with the HTTP request.
*/
password?: string;
/**
* Whether or not the request was a CORS request.
*/
crossDomain: boolean;
/**
* Whether or not a CORS request was sent with credentials.
* If `false`, will also ignore cookies in the CORS response.
*/
withCredentials: boolean;
/**
* The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) set before sending the request.
*/
responseType: XMLHttpRequestResponseType;
}
/**
* Configuration for the {@link ajax} creation function.
*/
export interface AjaxConfig {
/** The address of the resource to request via HTTP. */
url: string;
/**
* The body of the HTTP request to send.
*
* This is serialized, by default, based off of the value of the `"content-type"` header.
* For example, if the `"content-type"` is `"application/json"`, the body will be serialized
* as JSON. If the `"content-type"` is `"application/x-www-form-urlencoded"`, whatever object passed
* to the body will be serialized as URL, using key-value pairs based off of the keys and values of the object.
* In all other cases, the body will be passed directly.
*/
body?: any;
/**
* Whether or not to send the request asynchronously. Defaults to `true`.
* If set to `false`, this will block the thread until the AJAX request responds.
*/
async?: boolean;
/**
* The HTTP Method to use for the request. Defaults to "GET".
*/
method?: string;
/**
* The HTTP headers to apply.
*
* Note that, by default, RxJS will add the following headers under certain conditions:
*
* 1. If the `"content-type"` header is **NOT** set, and the `body` is [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData),
* a `"content-type"` of `"application/x-www-form-urlencoded; charset=UTF-8"` will be set automatically.
* 2. If the `"x-requested-with"` header is **NOT** set, and the `crossDomain` configuration property is **NOT** explicitly set to `true`,
* (meaning it is not a CORS request), a `"x-requested-with"` header with a value of `"XMLHttpRequest"` will be set automatically.
* This header is generally meaningless, and is set by libraries and frameworks using `XMLHttpRequest` to make HTTP requests.
*/
headers?: Readonly<Record<string, any>>;
/**
* The time to wait before causing the underlying XMLHttpRequest to timeout. This is only honored if the
* `async` configuration setting is unset or set to `true`. Defaults to `0`, which is idiomatic for "never timeout".
*/
timeout?: number;
/** The user credentials user name to send with the HTTP request */
user?: string;
/** The user credentials password to send with the HTTP request*/
password?: string;
/**
* Whether or not to send the HTTP request as a CORS request.
* Defaults to `false`.
*
* @deprecated Will be removed in version 8. Cross domain requests and what creates a cross
* domain request, are dictated by the browser, and a boolean that forces it to be cross domain
* does not make sense. If you need to force cross domain, make sure you're making a secure request,
* then add a custom header to the request or use `withCredentials`. For more information on what
* triggers a cross domain request, see the [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials).
* In particular, the section on [Simple Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests) is useful
* for understanding when CORS will not be used.
*/
crossDomain?: boolean;
/**
* To send user credentials in a CORS request, set to `true`. To exclude user credentials from
* a CORS request, _OR_ when cookies are to be ignored by the CORS response, set to `false`.
*
* Defaults to `false`.
*/
withCredentials?: boolean;
/**
* The name of your site's XSRF cookie.
*/
xsrfCookieName?: string;
/**
* The name of a custom header that you can use to send your XSRF cookie.
*/
xsrfHeaderName?: string;
/**
* Can be set to change the response type.
* Valid values are `"arraybuffer"`, `"blob"`, `"document"`, `"json"`, and `"text"`.
* Note that the type of `"document"` (such as an XML document) is ignored if the global context is
* not `Window`.
*
* Defaults to `"json"`.
*/
responseType?: XMLHttpRequestResponseType;
/**
* An optional factory used to create the XMLHttpRequest object used to make the AJAX request.
* This is useful in environments that lack `XMLHttpRequest`, or in situations where you
* wish to override the default `XMLHttpRequest` for some reason.
*
* If not provided, the `XMLHttpRequest` in global scope will be used.
*
* NOTE: This AJAX implementation relies on the built-in serialization and setting
* of Content-Type headers that is provided by standards-compliant XMLHttpRequest implementations,
* be sure any implementation you use meets that standard.
*/
createXHR?: () => XMLHttpRequest;
/**
* An observer for watching the upload progress of an HTTP request. Will
* emit progress events, and completes on the final upload load event, will error for
* any XHR error or timeout.
*
* This will **not** error for errored status codes. Rather, it will always _complete_ when
* the HTTP response comes back.
*
* @deprecated If you're looking for progress events, use {@link includeDownloadProgress} and
* {@link includeUploadProgress} instead. Will be removed in v8.
*/
progressSubscriber?: PartialObserver<ProgressEvent>;
/**
* If `true`, will emit all download progress and load complete events as {@link AjaxResponse}
* from the observable. The final download event will also be emitted as a {@link AjaxResponse}.
*
* If both this and {@link includeUploadProgress} are `false`, then only the {@link AjaxResponse} will
* be emitted from the resulting observable.
*/
includeDownloadProgress?: boolean;
/**
* If `true`, will emit all upload progress and load complete events as {@link AjaxResponse}
* from the observable. The final download event will also be emitted as a {@link AjaxResponse}.
*
* If both this and {@link includeDownloadProgress} are `false`, then only the {@link AjaxResponse} will
* be emitted from the resulting observable.
*/
includeUploadProgress?: boolean;
/**
* Query string parameters to add to the URL in the request.
* <em>This will require a polyfill for `URL` and `URLSearchParams` in Internet Explorer!</em>
*
* Accepts either a query string, a `URLSearchParams` object, a dictionary of key/value pairs, or an
* array of key/value entry tuples. (Essentially, it takes anything that `new URLSearchParams` would normally take).
*
* If, for some reason you have a query string in the `url` argument, this will append to the query string in the url,
* but it will also overwrite the value of any keys that are an exact match. In other words, a url of `/test?a=1&b=2`,
* with queryParams of `{ b: 5, c: 6 }` will result in a url of roughly `/test?a=1&b=5&c=6`.
*/
queryParams?: string | URLSearchParams | Record<string, string | number | boolean | string[] | number[] | boolean[]> | [string, string | number | boolean | string[] | number[] | boolean[]][];
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,341 @@
/* global document */
import { adapter as ProxyAdapterDom } from '../proxy-adapter-dom'
import { patchShowModal, getModalData } from './patch-page-show-modal'
patchShowModal()
// Svelte Native support
// =====================
//
// Rerendering Svelte Native page proves challenging...
//
// In NativeScript, pages are the top level component. They are normally
// introduced into NativeScript's runtime by its `navigate` function. This
// is how Svelte Natives handles it: it renders the Page component to a
// dummy fragment, and "navigate" to the page element thus created.
//
// As long as modifications only impact child components of the page, then
// we can keep the existing page and replace its content for HMR.
//
// However, if the page component itself is modified (including its system
// title bar), things get hairy...
//
// Apparently, the sole way of introducing a new page in a NS application is
// to navigate to it (no way to just replace it in its parent "element", for
// example). This is how it is done in NS's own "core" HMR.
//
// NOTE The last paragraph has not really been confirmed with NS6.
//
// Unfortunately the API they're using to do that is not public... Its various
// parts remain exposed though (but documented as private), so this exploratory
// work now relies on it. It might be fragile...
//
// The problem is that there is no public API that can navigate to a page and
// replace (like location.replace) the current history entry. Actually there
// is an active issue at NS asking for that. Incidentally, members of
// NativeScript-Vue have commented on the issue to weight in for it -- they
// probably face some similar challenge.
//
// https://github.com/NativeScript/NativeScript/issues/6283
const getNavTransition = ({ transition }) => {
if (typeof transition === 'string') {
transition = { name: transition }
}
return transition ? { animated: true, transition } : { animated: false }
}
// copied from TNS FrameBase.replacePage
//
// it is not public but there is a comment in there indicating it is for
// HMR (probably their own core HMR though)
//
// NOTE this "worked" in TNS 5, but not anymore in TNS 6: updated version bellow
//
// eslint-disable-next-line no-unused-vars
const replacePage_tns5 = (frame, newPageElement, hotOptions) => {
const currentBackstackEntry = frame._currentEntry
frame.navigationType = 2
frame.performNavigation({
isBackNavigation: false,
entry: {
resolvedPage: newPageElement.nativeView,
//
// entry: currentBackstackEntry.entry,
entry: Object.assign(
currentBackstackEntry.entry,
getNavTransition(hotOptions)
),
navDepth: currentBackstackEntry.navDepth,
fragmentTag: currentBackstackEntry.fragmentTag,
frameId: currentBackstackEntry.frameId,
},
})
}
// Updated for TNS v6
//
// https://github.com/NativeScript/NativeScript/blob/6.1.1/tns-core-modules/ui/frame/frame-common.ts#L656
const replacePage = (frame, newPageElement) => {
const currentBackstackEntry = frame._currentEntry
const newPage = newPageElement.nativeView
const newBackstackEntry = {
entry: currentBackstackEntry.entry,
resolvedPage: newPage,
navDepth: currentBackstackEntry.navDepth,
fragmentTag: currentBackstackEntry.fragmentTag,
frameId: currentBackstackEntry.frameId,
}
const navigationContext = {
entry: newBackstackEntry,
isBackNavigation: false,
navigationType: 2 /* NavigationType replace */,
}
frame._navigationQueue.push(navigationContext)
frame._processNextNavigationEntry()
}
export const adapter = class ProxyAdapterNative extends ProxyAdapterDom {
constructor(instance) {
super(instance)
this.nativePageElement = null
this.originalNativeView = null
this.navigatedFromHandler = null
this.relayNativeNavigatedFrom = this.relayNativeNavigatedFrom.bind(this)
}
dispose() {
super.dispose()
this.releaseNativePageElement()
}
releaseNativePageElement() {
if (this.nativePageElement) {
// native cleaning will happen when navigating back from the page
this.nativePageElement = null
}
}
// svelte-native uses navigateFrom event + e.isBackNavigation to know
// when to $destroy the component -- but we don't want our proxy instance
// destroyed when we renavigate to the same page for navigation purposes!
interceptPageNavigation(pageElement) {
const originalNativeView = pageElement.nativeView
const { on } = originalNativeView
const ownOn = originalNativeView.hasOwnProperty('on')
// tricks svelte-native into giving us its handler
originalNativeView.on = function(type, handler) {
if (type === 'navigatedFrom') {
this.navigatedFromHandler = handler
if (ownOn) {
originalNativeView.on = on
} else {
delete originalNativeView.on
}
} else {
//some other handler wireup, we will just pass it on.
if (on) {
on(type, handler)
}
}
}
}
afterMount(target, anchor) {
// nativePageElement needs to be updated each time (only for page
// components, native component that are not pages follow normal flow)
//
// TODO quid of components that are initially a page, but then have the
// <page> tag removed while running? or the opposite?
//
// insertionPoint needs to be updated _only when the target changes_ --
// i.e. when the component is mount, i.e. (in svelte3) when the component
// is _created_, and svelte3 doesn't allow it to move afterward -- that
// is, insertionPoint only needs to be created once when the component is
// first mounted.
//
// TODO is it really true that components' elements cannot move in the
// DOM? what about keyed list?
//
const isNativePage =
(target.tagName === 'fragment' || target.tagName === 'frame') &&
target.firstChild &&
target.firstChild.tagName == 'page'
if (isNativePage) {
const nativePageElement = target.firstChild
this.interceptPageNavigation(nativePageElement)
this.nativePageElement = nativePageElement
} else {
// try to protect against components changing from page to no-page
// or vice versa -- see DEBUG 1 above. NOT TESTED so prolly not working
this.nativePageElement = null
super.afterMount(target, anchor)
}
}
rerender() {
const { nativePageElement } = this
if (nativePageElement) {
this.rerenderNative()
} else {
super.rerender()
}
}
rerenderNative() {
const { nativePageElement: oldPageElement } = this
const nativeView = oldPageElement.nativeView
const frame = nativeView.frame
if (frame) {
return this.rerenderPage(frame, nativeView)
}
const modalParent = nativeView._modalParent // FIXME private API
if (modalParent) {
return this.rerenderModal(modalParent, nativeView)
}
// wtf? hopefully a race condition with a destroyed component, so
// we have nothing more to do here
//
// for once, it happens when hot reloading dev deps, like this file
//
}
rerenderPage(frame, previousPageView) {
const isCurrentPage = frame.currentPage === previousPageView
if (isCurrentPage) {
const {
instance: { hotOptions },
} = this
const newPageElement = this.createPage()
if (!newPageElement) {
throw new Error('Failed to create updated page')
}
const isFirstPage = !frame.canGoBack()
if (isFirstPage) {
// NOTE not so sure of bellow with the new NS6 method for replace
//
// The "replacePage" strategy does not work on the first page
// of the stack.
//
// Resulting bug:
// - launch
// - change first page => HMR
// - navigate to other page
// - back
// => actual: back to OS
// => expected: back to page 1
//
// Fortunately, we can overwrite history in this case.
//
const nativeView = newPageElement.nativeView
frame.navigate(
Object.assign(
{},
{
create: () => nativeView,
clearHistory: true,
},
getNavTransition(hotOptions)
)
)
} else {
replacePage(frame, newPageElement, hotOptions)
}
} else {
const backEntry = frame.backStack.find(
({ resolvedPage: page }) => page === previousPageView
)
if (!backEntry) {
// well... looks like we didn't make it to history after all
return
}
// replace existing nativeView
const newPageElement = this.createPage()
if (newPageElement) {
backEntry.resolvedPage = newPageElement.nativeView
} else {
throw new Error('Failed to create updated page')
}
}
}
// modalParent is the page on which showModal(...) was called
// oldPageElement is the modal content, that we're actually trying to reload
rerenderModal(modalParent, modalView) {
const modalData = getModalData(modalView)
modalData.closeCallback = () => {
const nativePageElement = this.createPage()
if (!nativePageElement) {
throw new Error('Failed to created updated modal page')
}
const { nativeView } = nativePageElement
const { originalOptions } = modalData
// Options will get monkey patched again, the only work left for us
// is to try to reduce visual disturbances.
//
// FIXME Even that proves too much unfortunately... Apparently TNS
// does not respect the `animated` option in this context:
// https://docs.nativescript.org/api-reference/interfaces/_ui_core_view_base_.showmodaloptions#animated
//
const options = Object.assign({}, originalOptions, { animated: false })
modalParent.showModal(nativeView, options)
}
modalView.closeModal()
}
createPage() {
const {
instance: { refreshComponent },
} = this
const { nativePageElement, relayNativeNavigatedFrom } = this
const oldNativeView = nativePageElement.nativeView
// rerender
const target = document.createElement('fragment')
// not using conservative for now, since there's nothing in place here to
// leverage it (yet?) -- and it might be easier to miss breakages in native
// only code paths
refreshComponent(target, null)
// this.nativePageElement is updated in afterMount, triggered by proxy / hooks
const newPageElement = this.nativePageElement
// update event proxy
oldNativeView.off('navigatedFrom', relayNativeNavigatedFrom)
nativePageElement.nativeView.on('navigatedFrom', relayNativeNavigatedFrom)
return newPageElement
}
relayNativeNavigatedFrom({ isBackNavigation }) {
const { originalNativeView, navigatedFromHandler } = this
if (!isBackNavigation) {
return
}
if (originalNativeView) {
const { off } = originalNativeView
const ownOff = originalNativeView.hasOwnProperty('off')
originalNativeView.off = function() {
this.navigatedFromHandler = null
if (ownOff) {
originalNativeView.off = off
} else {
delete originalNativeView.off
}
}
}
if (navigatedFromHandler) {
return navigatedFromHandler.apply(this, arguments)
}
}
renderError(err /* , target, anchor */) {
// TODO fallback on TNS error handler for now... at least our error
// is more informative
throw err
}
}

View File

@@ -0,0 +1,4 @@
export function isValidDate(value) {
return value instanceof Date && !isNaN(value);
}
//# sourceMappingURL=isDate.js.map

View File

@@ -0,0 +1,5 @@
import { reduce } from './reduce';
export function count(predicate) {
return reduce(function (total, value, i) { return (!predicate || predicate(value, i) ? total + 1 : total); }, 0);
}
//# sourceMappingURL=count.js.map

View File

@@ -0,0 +1,223 @@
"use strict";
module.exports = function(Promise,
apiRejection,
INTERNAL,
tryConvertToPromise,
Proxyable,
debug) {
var errors = require("./errors");
var TypeError = errors.TypeError;
var util = require("./util");
var errorObj = util.errorObj;
var tryCatch = util.tryCatch;
var yieldHandlers = [];
function promiseFromYieldHandler(value, yieldHandlers, traceParent) {
for (var i = 0; i < yieldHandlers.length; ++i) {
traceParent._pushContext();
var result = tryCatch(yieldHandlers[i])(value);
traceParent._popContext();
if (result === errorObj) {
traceParent._pushContext();
var ret = Promise.reject(errorObj.e);
traceParent._popContext();
return ret;
}
var maybePromise = tryConvertToPromise(result, traceParent);
if (maybePromise instanceof Promise) return maybePromise;
}
return null;
}
function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) {
if (debug.cancellation()) {
var internal = new Promise(INTERNAL);
var _finallyPromise = this._finallyPromise = new Promise(INTERNAL);
this._promise = internal.lastly(function() {
return _finallyPromise;
});
internal._captureStackTrace();
internal._setOnCancel(this);
} else {
var promise = this._promise = new Promise(INTERNAL);
promise._captureStackTrace();
}
this._stack = stack;
this._generatorFunction = generatorFunction;
this._receiver = receiver;
this._generator = undefined;
this._yieldHandlers = typeof yieldHandler === "function"
? [yieldHandler].concat(yieldHandlers)
: yieldHandlers;
this._yieldedPromise = null;
this._cancellationPhase = false;
}
util.inherits(PromiseSpawn, Proxyable);
PromiseSpawn.prototype._isResolved = function() {
return this._promise === null;
};
PromiseSpawn.prototype._cleanup = function() {
this._promise = this._generator = null;
if (debug.cancellation() && this._finallyPromise !== null) {
this._finallyPromise._fulfill();
this._finallyPromise = null;
}
};
PromiseSpawn.prototype._promiseCancelled = function() {
if (this._isResolved()) return;
var implementsReturn = typeof this._generator["return"] !== "undefined";
var result;
if (!implementsReturn) {
var reason = new Promise.CancellationError(
"generator .return() sentinel");
Promise.coroutine.returnSentinel = reason;
this._promise._attachExtraTrace(reason);
this._promise._pushContext();
result = tryCatch(this._generator["throw"]).call(this._generator,
reason);
this._promise._popContext();
} else {
this._promise._pushContext();
result = tryCatch(this._generator["return"]).call(this._generator,
undefined);
this._promise._popContext();
}
this._cancellationPhase = true;
this._yieldedPromise = null;
this._continue(result);
};
PromiseSpawn.prototype._promiseFulfilled = function(value) {
this._yieldedPromise = null;
this._promise._pushContext();
var result = tryCatch(this._generator.next).call(this._generator, value);
this._promise._popContext();
this._continue(result);
};
PromiseSpawn.prototype._promiseRejected = function(reason) {
this._yieldedPromise = null;
this._promise._attachExtraTrace(reason);
this._promise._pushContext();
var result = tryCatch(this._generator["throw"])
.call(this._generator, reason);
this._promise._popContext();
this._continue(result);
};
PromiseSpawn.prototype._resultCancelled = function() {
if (this._yieldedPromise instanceof Promise) {
var promise = this._yieldedPromise;
this._yieldedPromise = null;
promise.cancel();
}
};
PromiseSpawn.prototype.promise = function () {
return this._promise;
};
PromiseSpawn.prototype._run = function () {
this._generator = this._generatorFunction.call(this._receiver);
this._receiver =
this._generatorFunction = undefined;
this._promiseFulfilled(undefined);
};
PromiseSpawn.prototype._continue = function (result) {
var promise = this._promise;
if (result === errorObj) {
this._cleanup();
if (this._cancellationPhase) {
return promise.cancel();
} else {
return promise._rejectCallback(result.e, false);
}
}
var value = result.value;
if (result.done === true) {
this._cleanup();
if (this._cancellationPhase) {
return promise.cancel();
} else {
return promise._resolveCallback(value);
}
} else {
var maybePromise = tryConvertToPromise(value, this._promise);
if (!(maybePromise instanceof Promise)) {
maybePromise =
promiseFromYieldHandler(maybePromise,
this._yieldHandlers,
this._promise);
if (maybePromise === null) {
this._promiseRejected(
new TypeError(
"A value %s was yielded that could not be treated as a promise\u000a\u000a See http://goo.gl/MqrFmX\u000a\u000a".replace("%s", String(value)) +
"From coroutine:\u000a" +
this._stack.split("\n").slice(1, -7).join("\n")
)
);
return;
}
}
maybePromise = maybePromise._target();
var bitField = maybePromise._bitField;
;
if (((bitField & 50397184) === 0)) {
this._yieldedPromise = maybePromise;
maybePromise._proxy(this, null);
} else if (((bitField & 33554432) !== 0)) {
Promise._async.invoke(
this._promiseFulfilled, this, maybePromise._value()
);
} else if (((bitField & 16777216) !== 0)) {
Promise._async.invoke(
this._promiseRejected, this, maybePromise._reason()
);
} else {
this._promiseCancelled();
}
}
};
Promise.coroutine = function (generatorFunction, options) {
if (typeof generatorFunction !== "function") {
throw new TypeError("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
}
var yieldHandler = Object(options).yieldHandler;
var PromiseSpawn$ = PromiseSpawn;
var stack = new Error().stack;
return function () {
var generator = generatorFunction.apply(this, arguments);
var spawn = new PromiseSpawn$(undefined, undefined, yieldHandler,
stack);
var ret = spawn.promise();
spawn._generator = generator;
spawn._promiseFulfilled(undefined);
return ret;
};
};
Promise.coroutine.addYieldHandler = function(fn) {
if (typeof fn !== "function") {
throw new TypeError("expecting a function but got " + util.classString(fn));
}
yieldHandlers.push(fn);
};
Promise.spawn = function (generatorFunction) {
debug.deprecated("Promise.spawn()", "Promise.coroutine()");
if (typeof generatorFunction !== "function") {
return apiRejection("generatorFunction must be a function\u000a\u000a See http://goo.gl/MqrFmX\u000a");
}
var spawn = new PromiseSpawn(generatorFunction, this);
var ret = spawn.promise();
spawn._run(Promise.spawn);
return ret;
};
};

View File

@@ -0,0 +1,21 @@
/**
* A specialized version of `_.lastIndexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictLastIndexOf(array, value, fromIndex) {
var index = fromIndex + 1;
while (index--) {
if (array[index] === value) {
return index;
}
}
return index;
}
module.exports = strictLastIndexOf;

View File

@@ -0,0 +1,48 @@
import { Observable } from '../Observable';
import { ObservableInput, OperatorFunction } from '../types';
/**
* Branch out the source Observable values as a nested Observable using a
* factory function of closing Observables to determine when to start a new
* window.
*
* <span class="informal">It's like {@link bufferWhen}, but emits a nested
* Observable instead of an array.</span>
*
* ![](windowWhen.png)
*
* Returns an Observable that emits windows of items it collects from the source
* Observable. The output Observable emits connected, non-overlapping windows.
* It emits the current window and opens a new one whenever the Observable
* produced by the specified `closingSelector` function emits an item. The first
* window is opened immediately when subscribing to the output Observable.
*
* ## Example
*
* Emit only the first two clicks events in every window of [1-5] random seconds
*
* ```ts
* import { fromEvent, windowWhen, interval, map, take, mergeAll } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const result = clicks.pipe(
* windowWhen(() => interval(1000 + Math.random() * 4000)),
* map(win => win.pipe(take(2))), // take at most 2 emissions from each window
* mergeAll() // flatten the Observable-of-Observables
* );
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link window}
* @see {@link windowCount}
* @see {@link windowTime}
* @see {@link windowToggle}
* @see {@link bufferWhen}
*
* @param {function(): Observable} closingSelector A function that takes no
* arguments and returns an Observable that signals (on either `next` or
* `complete`) when to close the previous window and start a new one.
* @return A function that returns an Observable of windows, which in turn are
* Observables.
*/
export declare function windowWhen<T>(closingSelector: () => ObservableInput<any>): OperatorFunction<T, Observable<T>>;
//# sourceMappingURL=windowWhen.d.ts.map

View File

@@ -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/is-set
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']

View File

@@ -0,0 +1 @@
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../../src/internal/operators/audit.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA+ChE,MAAM,UAAU,KAAK,CAAI,gBAAoD;IAC3E,OAAO,OAAO,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;QACpC,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,kBAAkB,GAA2B,IAAI,CAAC;QACtD,IAAI,UAAU,GAAG,KAAK,CAAC;QAEvB,MAAM,WAAW,GAAG,GAAG,EAAE;YACvB,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,WAAW,EAAE,CAAC;YAClC,kBAAkB,GAAG,IAAI,CAAC;YAC1B,IAAI,QAAQ,EAAE;gBACZ,QAAQ,GAAG,KAAK,CAAC;gBACjB,MAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;YACD,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,eAAe,GAAG,GAAG,EAAE;YAC3B,kBAAkB,GAAG,IAAI,CAAC;YAC1B,UAAU,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QACtC,CAAC,CAAC;QAEF,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,CAAC,KAAK,EAAE,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,SAAS,GAAG,KAAK,CAAC;YAClB,IAAI,CAAC,kBAAkB,EAAE;gBACvB,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAC1C,CAAC,kBAAkB,GAAG,wBAAwB,CAAC,UAAU,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAC1F,CAAC;aACH;QACH,CAAC,EACD,GAAG,EAAE;YACH,UAAU,GAAG,IAAI,CAAC;YAClB,CAAC,CAAC,QAAQ,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,MAAM,CAAC,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC3F,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}