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,5 @@
var convert = require('./convert'),
func = convert('startsWith', require('../startsWith'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,47 @@
# unbox-primitive <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]
Unbox a boxed JS primitive value. This module works cross-realm/iframe, does not depend on `instanceof` or mutable properties, and works despite ES6 Symbol.toStringTag.
## Example
```js
var unboxPrimitive = require('unbox-primitive');
var assert = require('assert');
assert.equal(unboxPrimitive(new Boolean(false)), false);
assert.equal(unboxPrimitive(new String('f')), 'f');
assert.equal(unboxPrimitive(new Number(42)), 42);
const s = Symbol();
assert.equal(unboxPrimitive(Object(s)), s);
assert.equal(unboxPrimitive(new BigInt(42)), 42n);
// any primitive, or non-boxed-primitive object, will throw
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.org/package/unbox-primitive
[npm-version-svg]: https://versionbadg.es/ljharb/unbox-primitive.svg
[deps-svg]: https://david-dm.org/ljharb/unbox-primitive.svg
[deps-url]: https://david-dm.org/ljharb/unbox-primitive
[dev-deps-svg]: https://david-dm.org/ljharb/unbox-primitive/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/unbox-primitive#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/unbox-primitive.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/unbox-primitive.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/unbox-primitive.svg
[downloads-url]: https://npm-stat.com/charts.html?package=unbox-primitive
[codecov-image]: https://codecov.io/gh/ljharb/unbox-primitive/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/unbox-primitive/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/unbox-primitive
[actions-url]: https://github.com/ljharb/unbox-primitive/actions

View File

@@ -0,0 +1,33 @@
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* Gets the view, applying any `transforms` to the `start` and `end` positions.
*
* @private
* @param {number} start The start of the view.
* @param {number} end The end of the view.
* @param {Array} transforms The transformations to apply to the view.
* @returns {Object} Returns an object containing the `start` and `end`
* positions of the view.
*/
function getView(start, end, transforms) {
var index = -1,
length = transforms.length;
while (++index < length) {
var data = transforms[index],
size = data.size;
switch (data.type) {
case 'drop': start += size; break;
case 'dropRight': end -= size; break;
case 'take': end = nativeMin(end, start + size); break;
case 'takeRight': start = nativeMax(start, end - size); break;
}
}
return { 'start': start, 'end': end };
}
module.exports = getView;

View File

@@ -0,0 +1,95 @@
{
"commands": {
"parse": "(Default)Parse a csv file to json",
"version": "Show version of current csvtojson"
},
"options": {
"--output":{
"desc": "The format to be converted to. \"json\" (default) -- convert csv to json. \"csv\" -- convert csv to csv row array. \"line\" -- convert csv to csv line string",
"type": "string"
},
"--delimiter": {
"desc": "delimiter to separate columns. Possible to give an array or just use 'auto'. default comma (,). e.g. --delimiter=# --delimiter='[\",\",\";\"]' --delimiter=auto",
"type": "~object"
},
"--quote": {
"desc": "quote surrounding a column content containing delimiters. To turn off quote, please use 'off' --quote=off. default double quote (\"). e.g. chage to hash: --quote=# ",
"type": "string"
},
"--trim": {
"desc": "Indicate if parser trim off spaces surrounding column content. e.g. \" content \" will be trimmed to \"content\". Default: true",
"type": "boolean"
},
"--checkType": {
"desc": "This parameter turns on and off whether check field type. default is false.",
"type": "boolean"
},
"--ignoreEmpty": {
"desc": "This parameter turns on and off whether ignore empty column values while parsing. default is false",
"type": "boolean"
},
"--noheader": {
"desc": "Indicating csv data has no header row and first row is data row. Default is false",
"type": "boolean"
},
"--headers": {
"desc": "An array to specify the headers of CSV data. If --noheader is false, this value will override CSV header. Default: null. Example: --headers='[\"my field\",\"name\"]'",
"type": "object"
},
"--flatKeys": {
"desc": "Don't interpret dots (.) and square brackets in header fields as nested object or array identifiers at all (treat them like regular characters for JSON field identifiers). Default: false.",
"type": "boolean"
},
"--maxRowLength": {
"desc": "the max character a csv row could have. 0 means infinite. If max number exceeded, parser will emit \"error\" of \"row_exceed\". if a possibly corrupted csv data provided, give it a number like 65535 so the parser wont consume memory. default: 10240",
"type": "number"
},
"--checkColumn": {
"desc": "whether check column number of a row is the same as headers. If column number mismatched headers number, an error of \"mismatched_column\" will be emitted.. default: false",
"type": "boolean"
},
"--eol": {
"desc": "Explicitly specify the end of line character to use.",
"type": "string"
},
"--quiet": {
"desc": "If any error happens, quit the process quietly rather than log out the error. Default is false.",
"type": "boolean"
},
"--escape":{
"desc":"escape character used in quoted column. Default is double quote (\") according to RFC4108. Change to back slash (\\) or other chars for your own case.",
"type":"string"
},
"--ignoreColumns": {
"desc": "RegExp matched columns to ignore from input. e.g. --ignoreColumns=/(name|age)/ ",
"type": "string"
},
"--includeColumns": {
"desc": "RegExp matched columns to include from input. e.g. --includeColumns=/(name|age)/ ",
"type": "string"
},
"--colParser": {
"desc": "Specific parser for columns. e.g. --colParser='{\"col1\":\"number\",\"col2\":\"string\"}'",
"type": "~object"
},
"--alwaysSplitAtEOL":{
"desc": "Always interpret each line (as defined by eol) as a row. This will prevent eol characters from being used within a row (even inside a quoted field). This ensures that misplaced quotes only break on row, and not all ensuing rows.",
"type": "boolean"
},
"--nullObject":{
"desc":"How to parse if a csv cell contains 'null'. Default false will keep 'null' as string. Change to true if a null object is needed.",
"type":"boolean"
},
"--downstreamFormat":{
"desc":"Option to set what JSON array format is needed by downstream. 'line' is also called ndjson format. This format will write lines of JSON (without square brackets and commas) to downstream. 'array' will write complete JSON array string to downstream (suitable for file writable stream etc). Default 'line'",
"type":"string"
}
},
"examples": [
"csvtojson < csvfile",
"csvtojson <path to csvfile>",
"cat <csvfile> | csvtojson",
"csvtojson <csvfilepath> --checkType=false --trim=false --delimiter=#"
]
}

View File

@@ -0,0 +1,23 @@
"use strict";
// store whether supports-color mode is enabled or not.
var state = null;
// force supports-color mode
var enableColor = function () { state = true; };
// disable supports-color mode
var disableColor = function () { state = false; };
// use the NO_COLOR environment variable (default)
var autoDetectSupport = function () { state = null; };
// determine whether supports-color mode is enabled.
var isColorSupported = function () { return state === null ? !process.env.NO_COLOR : state; };
module.exports = {
enableColor: enableColor,
disableColor: disableColor,
autoDetectSupport: autoDetectSupport,
isColorSupported: isColorSupported
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"subscribeToArray.js","sourceRoot":"","sources":["../../../../src/internal/util/subscribeToArray.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAI,KAAmB,EAAE,EAAE,CAAC,CAAC,UAAyB,EAAE,EAAE;IACxF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD,UAAU,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC,CAAC"}

View File

@@ -0,0 +1,34 @@
var baseInvoke = require('./_baseInvoke'),
baseRest = require('./_baseRest');
/**
* Creates a function that invokes the method at `path` of a given object.
* Any additional arguments are provided to the invoked method.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Util
* @param {Array|string} path The path of the method to invoke.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {Function} Returns the new invoker function.
* @example
*
* var objects = [
* { 'a': { 'b': _.constant(2) } },
* { 'a': { 'b': _.constant(1) } }
* ];
*
* _.map(objects, _.method('a.b'));
* // => [2, 1]
*
* _.map(objects, _.method(['a', 'b']));
* // => [2, 1]
*/
var method = baseRest(function(path, args) {
return function(object) {
return baseInvoke(object, path, args);
};
});
module.exports = method;

View File

@@ -0,0 +1,30 @@
{
"maxdepth": 4,
"maxstatements": 200,
"maxcomplexity": 12,
"maxlen": 80,
"maxparams": 5,
"curly": true,
"eqeqeq": true,
"immed": true,
"latedef": false,
"noarg": true,
"noempty": true,
"nonew": true,
"undef": true,
"unused": "vars",
"trailing": true,
"quotmark": true,
"expr": true,
"asi": true,
"browser": false,
"esnext": true,
"devel": false,
"node": false,
"nonstandard": false,
"predef": ["require", "module", "__dirname", "__filename"]
}

View File

@@ -0,0 +1,61 @@
import {Primitive} from './primitive';
/**
Convert `object`s, `Map`s, `Set`s, and `Array`s and all of their keys/elements into immutable structures recursively.
This is useful when a deeply nested structure needs to be exposed as completely immutable, for example, an imported JSON module or when receiving an API response that is passed around.
Please upvote [this issue](https://github.com/microsoft/TypeScript/issues/13923) if you want to have this type as a built-in in TypeScript.
@example
```
// data.json
{
"foo": ["bar"]
}
// main.ts
import {ReadonlyDeep} from 'type-fest';
import dataJson = require('./data.json');
const data: ReadonlyDeep<typeof dataJson> = dataJson;
export default data;
// test.ts
import data from './main';
data.foo.push('bar');
//=> error TS2339: Property 'push' does not exist on type 'readonly string[]'
```
@category Utilities
*/
export type ReadonlyDeep<T> = T extends Primitive | ((...arguments: any[]) => unknown)
? T
: T extends ReadonlyMap<infer KeyType, infer ValueType>
? ReadonlyMapDeep<KeyType, ValueType>
: T extends ReadonlySet<infer ItemType>
? ReadonlySetDeep<ItemType>
: T extends object
? ReadonlyObjectDeep<T>
: unknown;
/**
Same as `ReadonlyDeep`, but accepts only `ReadonlyMap`s as inputs. Internal helper for `ReadonlyDeep`.
*/
interface ReadonlyMapDeep<KeyType, ValueType>
extends ReadonlyMap<ReadonlyDeep<KeyType>, ReadonlyDeep<ValueType>> {}
/**
Same as `ReadonlyDeep`, but accepts only `ReadonlySet`s as inputs. Internal helper for `ReadonlyDeep`.
*/
interface ReadonlySetDeep<ItemType>
extends ReadonlySet<ReadonlyDeep<ItemType>> {}
/**
Same as `ReadonlyDeep`, but accepts only `object`s as inputs. Internal helper for `ReadonlyDeep`.
*/
type ReadonlyObjectDeep<ObjectType extends object> = {
readonly [KeyType in keyof ObjectType]: ReadonlyDeep<ObjectType[KeyType]>
};

View File

@@ -0,0 +1,5 @@
import { Observable } from '../Observable';
import { ObservableInputTuple } from '../types';
export declare function onErrorResumeNext<A extends readonly unknown[]>(sources: [...ObservableInputTuple<A>]): Observable<A[number]>;
export declare function onErrorResumeNext<A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): Observable<A[number]>;
//# sourceMappingURL=onErrorResumeNext.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AsyncSubject.d.ts","sourceRoot":"","sources":["../../../src/internal/AsyncSubject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC;;;;;GAKG;AACH,qBAAa,YAAY,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAS;IAa5B,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAOpB,QAAQ,IAAI,IAAI;CAQjB"}

View File

@@ -0,0 +1,51 @@
import { Observable } from '../Observable';
import { ObservableInput, OperatorFunction } from '../types';
/**
* Branch out the source Observable values as a nested Observable starting from
* an emission from `openings` and ending when the output of `closingSelector`
* emits.
*
* <span class="informal">It's like {@link bufferToggle}, but emits a nested
* Observable instead of an array.</span>
*
* ![](windowToggle.png)
*
* Returns an Observable that emits windows of items it collects from the source
* Observable. The output Observable emits windows that contain those items
* emitted by the source Observable between the time when the `openings`
* Observable emits an item and when the Observable returned by
* `closingSelector` emits an item.
*
* ## Example
*
* Every other second, emit the click events from the next 500ms
*
* ```ts
* import { fromEvent, interval, windowToggle, EMPTY, mergeAll } from 'rxjs';
*
* const clicks = fromEvent(document, 'click');
* const openings = interval(1000);
* const result = clicks.pipe(
* windowToggle(openings, i => i % 2 ? interval(500) : EMPTY),
* mergeAll()
* );
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link window}
* @see {@link windowCount}
* @see {@link windowTime}
* @see {@link windowWhen}
* @see {@link bufferToggle}
*
* @param {Observable<O>} openings An observable of notifications to start new
* windows.
* @param {function(value: O): Observable} closingSelector A function that takes
* the value emitted by the `openings` observable and returns an Observable,
* which, when it emits a next notification, signals that the
* associated window should complete.
* @return A function that returns an Observable of windows, which in turn are
* Observables.
*/
export declare function windowToggle<T, O>(openings: ObservableInput<O>, closingSelector: (openValue: O) => ObservableInput<any>): OperatorFunction<T, Observable<T>>;
//# sourceMappingURL=windowToggle.d.ts.map

View File

@@ -0,0 +1 @@
{"name":"parse-url","version":"8.1.0","files":{"LICENSE":{"checkedAt":1678883670748,"integrity":"sha512-yEG/RgRB4Oj58Hodk3CbrvBh7dgBj3mxnLY8c7eR2EkLfOdg1h9IWvXfyQoc8K+IUpu1F6tJP6hou/A+wZg4Nw==","mode":420,"size":1134},"dist/index.js":{"checkedAt":1678883670848,"integrity":"sha512-LeDF74AHlBFeEAD1Sh6EYfPQC2adegosypZSsW/eNJxeM7dDdtAyIQtrVtfv6Kp0fMyUeMrhiPgYhwixDMeBcA==","mode":493,"size":10336},"src/index.js":{"checkedAt":1678883670852,"integrity":"sha512-36FCXUH/ymp0RQKwIbysobXxReiqJCQ0v7sAMrQb3LKpR+07TrOJBYlLF6ebN9zvvD5CpFn87lqcp5wF//7ASA==","mode":420,"size":2791},"package.json":{"checkedAt":1678883670852,"integrity":"sha512-NMh+mIpI+XXdhinZwsssHbUQmVu+GKg3cODOXI3gM1uamEl5fDRg89mld35AFQYsJWwn731QsFOgXd1LP4bU2g==","mode":420,"size":1507},"README.md":{"checkedAt":1678883670852,"integrity":"sha512-t7LJB+hhUemFamtcvoBybv7gkcNYvERUBxWT4VIP99jv7XjIBNnc35Ey2AfBr9IASPciBTl58bxy1XXPiaYExw==","mode":420,"size":10043},"index.d.ts":{"checkedAt":1678883670854,"integrity":"sha512-w1iq1XMTLhPxpw2Px8+UaBeBGTQxldctpJUCFwpNR5DNp6Z+axBUHOxY+E473CoE55ZiLI5j5o9zs2hFNo7bew==","mode":420,"size":364},"dist/index.mjs":{"checkedAt":1678883670854,"integrity":"sha512-FEuLmzt9PHIMCTXCohqVjtPZj1wCGhPHKVTnmAu/B+iERkOjzG/s2lWOUKY8ZxwuF3sGQSbRDv4SyrsriJRHiQ==","mode":493,"size":10114}}}

View File

@@ -0,0 +1,9 @@
var test = require('tap').test;
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/chained.js');
test('chained', function (t) {
t.deepEqual(detective(src), [ 'c', 'b', 'a' ]);
t.end();
});

View File

@@ -0,0 +1,97 @@
{
"name": "globalthis",
"version": "1.0.3",
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"description": "ECMAScript spec-compliant polyfill/shim for `globalThis`",
"license": "MIT",
"main": "index.js",
"browser": {
"./implementation": "./implementation.browser.js"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublishOnly": "safe-publish-latest && npm run build",
"prepublish": "not-in-publish || npm run prepublishOnly",
"pretest": "npm run lint",
"test": "npm run --silent tests-only",
"posttest": "aud --production",
"tests-only": "nyc tape 'test/**/*.js'",
"lint": "eslint --ext=js,mjs .",
"postlint": "es-shim-api --bound --property",
"build": "mkdir -p dist && browserify browserShim.js > dist/browser.js",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git://github.com/ljharb/System.global.git"
},
"keywords": [
"window",
"self",
"global",
"globalThis",
"System.global",
"global object",
"global this value",
"ECMAScript",
"es-shim API",
"polyfill",
"shim"
],
"dependencies": {
"define-properties": "^1.1.3"
},
"devDependencies": {
"@es-shims/api": "^2.2.3",
"@ljharb/eslint-config": "^21.0.0",
"aud": "^2.0.0",
"auto-changelog": "^2.4.0",
"browserify": "^16.5.2",
"eslint": "=8.8.0",
"for-each": "^0.3.3",
"in-publish": "^2.0.1",
"is": "^3.3.0",
"nyc": "^10.3.2",
"safe-publish-latest": "^2.0.0",
"tape": "^5.5.3"
},
"testling": {
"files": "test/index.js",
"browsers": [
"iexplore/6.0..latest",
"firefox/3.0..6.0",
"firefox/15.0..latest",
"firefox/nightly",
"chrome/4.0..10.0",
"chrome/20.0..latest",
"chrome/canary",
"opera/10.0..latest",
"opera/next",
"safari/4.0..latest",
"ipad/6.0..latest",
"iphone/6.0..latest",
"android-browser/4.2"
]
},
"engines": {
"node": ">= 0.4"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
"browserShim.js",
".github/workflows"
]
}
}

View File

@@ -0,0 +1,30 @@
var freeGlobal = require('./_freeGlobal');
/** Detect free variable `exports`. */
var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
// Use `util.types` for Node.js 10+.
var types = freeModule && freeModule.require && freeModule.require('util').types;
if (types) {
return types;
}
// Legacy `process.binding('util')` for Node.js < 10.
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
module.exports = nodeUtil;

View File

@@ -0,0 +1,16 @@
var baseGet = require('./_baseGet'),
baseSlice = require('./_baseSlice');
/**
* Gets the parent value at `path` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} path The path to get the parent value of.
* @returns {*} Returns the parent value.
*/
function parent(object, path) {
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
}
module.exports = parent;

View File

@@ -0,0 +1,18 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var Get = require('./Get');
var ToBoolean = require('./ToBoolean');
var Type = require('./Type');
// https://262.ecma-international.org/6.0/#sec-iteratorcomplete
module.exports = function IteratorComplete(iterResult) {
if (Type(iterResult) !== 'Object') {
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
}
return ToBoolean(Get(iterResult, 'done'));
};

View File

@@ -0,0 +1,72 @@
# path-type [![Build Status](https://travis-ci.org/sindresorhus/path-type.svg?branch=master)](https://travis-ci.org/sindresorhus/path-type)
> Check if a path is a file, directory, or symlink
## Install
```
$ npm install path-type
```
## Usage
```js
const {isFile} = require('path-type');
(async () => {
console.log(await isFile('package.json'));
//=> true
})();
```
## API
### isFile(path)
Check whether the passed `path` is a file.
Returns a `Promise<boolean>`.
#### path
Type: `string`
The path to check.
### isDirectory(path)
Check whether the passed `path` is a directory.
Returns a `Promise<boolean>`.
### isSymlink(path)
Check whether the passed `path` is a symlink.
Returns a `Promise<boolean>`.
### isFileSync(path)
Synchronously check whether the passed `path` is a file.
Returns a `boolean`.
### isDirectorySync(path)
Synchronously check whether the passed `path` is a directory.
Returns a `boolean`.
### isSymlinkSync(path)
Synchronously check whether the passed `path` is a symlink.
Returns a `boolean`.
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)

View File

@@ -0,0 +1 @@
{"version":3,"file":"loaders.d.ts","sourceRoot":"","sources":["../src/loaders.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA0CtC,QAAA,MAAM,OAAO,EAAE,WAA4C,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,CAAC"}

View File

@@ -0,0 +1,3 @@
export declare function create_rule(node: Element & ElementCSSInlineStyle, a: number, b: number, duration: number, delay: number, ease: (t: number) => number, fn: (t: number, u: number) => string, uid?: number): string;
export declare function delete_rule(node: Element & ElementCSSInlineStyle, name?: string): void;
export declare function clear_rules(): void;

View File

@@ -0,0 +1,20 @@
import { OperatorFunction, ObservableInput } from '../types';
import { zip } from '../observable/zip';
import { joinAllInternals } from './joinAllInternals';
/**
* Collects all observable inner sources from the source, once the source completes,
* it will subscribe to all inner sources, combining their values by index and emitting
* them.
*
* @see {@link zipWith}
* @see {@link zip}
*/
export function zipAll<T>(): OperatorFunction<ObservableInput<T>, T[]>;
export function zipAll<T>(): OperatorFunction<any, T[]>;
export function zipAll<T, R>(project: (...values: T[]) => R): OperatorFunction<ObservableInput<T>, R>;
export function zipAll<R>(project: (...values: Array<any>) => R): OperatorFunction<any, R>;
export function zipAll<T, R>(project?: (...values: T[]) => R) {
return joinAllInternals(zip, project);
}

View File

@@ -0,0 +1,30 @@
import { HookCollection } from "before-after-hook";
import { request } from "@octokit/request";
import { graphql } from "@octokit/graphql";
import { Constructor, Hooks, OctokitOptions, OctokitPlugin, ReturnTypeOf, UnionToIntersection } from "./types";
export declare class Octokit {
static VERSION: string;
static defaults<S extends Constructor<any>>(this: S, defaults: OctokitOptions | Function): S;
static plugins: OctokitPlugin[];
/**
* Attach a plugin (or many) to your Octokit instance.
*
* @example
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
*/
static plugin<S extends Constructor<any> & {
plugins: any[];
}, T extends OctokitPlugin[]>(this: S, ...newPlugins: T): S & Constructor<UnionToIntersection<ReturnTypeOf<T>>>;
constructor(options?: OctokitOptions);
request: typeof request;
graphql: typeof graphql;
log: {
debug: (message: string, additionalInfo?: object) => any;
info: (message: string, additionalInfo?: object) => any;
warn: (message: string, additionalInfo?: object) => any;
error: (message: string, additionalInfo?: object) => any;
[key: string]: any;
};
hook: HookCollection<Hooks>;
auth: (...args: unknown[]) => Promise<unknown>;
}

View File

@@ -0,0 +1,51 @@
import { BaseComponent, BaseProps } from './view/base';
import { Component, ComponentProps } from 'preact';
/**
* BaseProps for all plugins
*/
export interface PluginBaseProps<T extends PluginBaseComponentCtor> {
plugin: Plugin<T>;
}
/**
* BaseComponent for all plugins
*/
export declare abstract class PluginBaseComponent<
P extends PluginBaseProps<any> = any,
S = {}
> extends BaseComponent<P, S> {}
export interface PluginBaseComponentCtor<
P extends PluginBaseProps<any> = any,
S = {}
> {
new (props: P, context?: any): Component<P, S>;
}
export declare enum PluginPosition {
Header = 0,
Footer = 1,
Cell = 2,
}
export interface Plugin<T extends PluginBaseComponentCtor> {
id: string;
position: PluginPosition;
component: T;
props?: Partial<ComponentProps<T>>;
order?: number;
}
export declare class PluginManager {
private readonly plugins;
constructor();
get<T extends PluginBaseComponentCtor>(id: string): Plugin<T> | null;
add<T extends PluginBaseComponentCtor>(plugin: Plugin<T>): this;
remove(id: string): this;
list<T extends PluginBaseComponentCtor>(
position?: PluginPosition,
): Plugin<T>[];
}
export interface PluginRendererProps extends BaseProps {
props?: any;
pluginId?: string;
position?: PluginPosition;
}
export declare class PluginRenderer extends BaseComponent<PluginRendererProps> {
render(): import('preact').VNode<any>;
}

View File

@@ -0,0 +1,96 @@
# cross-spawn
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Build status][appveyor-image]][appveyor-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]
[npm-url]:https://npmjs.org/package/cross-spawn
[downloads-image]:https://img.shields.io/npm/dm/cross-spawn.svg
[npm-image]:https://img.shields.io/npm/v/cross-spawn.svg
[travis-url]:https://travis-ci.org/moxystudio/node-cross-spawn
[travis-image]:https://img.shields.io/travis/moxystudio/node-cross-spawn/master.svg
[appveyor-url]:https://ci.appveyor.com/project/satazor/node-cross-spawn
[appveyor-image]:https://img.shields.io/appveyor/ci/satazor/node-cross-spawn/master.svg
[codecov-url]:https://codecov.io/gh/moxystudio/node-cross-spawn
[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/node-cross-spawn/master.svg
[david-dm-url]:https://david-dm.org/moxystudio/node-cross-spawn
[david-dm-image]:https://img.shields.io/david/moxystudio/node-cross-spawn.svg
[david-dm-dev-url]:https://david-dm.org/moxystudio/node-cross-spawn?type=dev
[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/node-cross-spawn.svg
A cross platform solution to node's spawn and spawnSync.
## Installation
Node.js version 8 and up:
`$ npm install cross-spawn`
Node.js version 7 and under:
`$ npm install cross-spawn@6`
## Why
Node has issues when using spawn on Windows:
- It ignores [PATHEXT](https://github.com/joyent/node/issues/2318)
- It does not support [shebangs](https://en.wikipedia.org/wiki/Shebang_(Unix))
- Has problems running commands with [spaces](https://github.com/nodejs/node/issues/7367)
- Has problems running commands with posix relative paths (e.g.: `./my-folder/my-executable`)
- Has an [issue](https://github.com/moxystudio/node-cross-spawn/issues/82) with command shims (files in `node_modules/.bin/`), where arguments with quotes and parenthesis would result in [invalid syntax error](https://github.com/moxystudio/node-cross-spawn/blob/e77b8f22a416db46b6196767bcd35601d7e11d54/test/index.test.js#L149)
- No `options.shell` support on node `<v4.8`
All these issues are handled correctly by `cross-spawn`.
There are some known modules, such as [win-spawn](https://github.com/ForbesLindesay/win-spawn), that try to solve this but they are either broken or provide faulty escaping of shell arguments.
## Usage
Exactly the same way as node's [`spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) or [`spawnSync`](https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options), so it's a drop in replacement.
```js
const spawn = require('cross-spawn');
// Spawn NPM asynchronously
const child = spawn('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
// Spawn NPM synchronously
const result = spawn.sync('npm', ['list', '-g', '-depth', '0'], { stdio: 'inherit' });
```
## Caveats
### Using `options.shell` as an alternative to `cross-spawn`
Starting from node `v4.8`, `spawn` has a `shell` option that allows you run commands from within a shell. This new option solves
the [PATHEXT](https://github.com/joyent/node/issues/2318) issue but:
- It's not supported in node `<v4.8`
- You must manually escape the command and arguments which is very error prone, specially when passing user input
- There are a lot of other unresolved issues from the [Why](#why) section that you must take into account
If you are using the `shell` option to spawn a command in a cross platform way, consider using `cross-spawn` instead. You have been warned.
### `options.shell` support
While `cross-spawn` adds support for `options.shell` in node `<v4.8`, all of its enhancements are disabled.
This mimics the Node.js behavior. More specifically, the command and its arguments will not be automatically escaped nor shebang support will be offered. This is by design because if you are using `options.shell` you are probably targeting a specific platform anyway and you don't want things to get into your way.
### Shebangs support
While `cross-spawn` handles shebangs on Windows, its support is limited. More specifically, it just supports `#!/usr/bin/env <program>` where `<program>` must not contain any arguments.
If you would like to have the shebang support improved, feel free to contribute via a pull-request.
Remember to always test your code on Windows!
## Tests
`$ npm test`
`$ npm test -- --watch` during development
## License
Released under the [MIT License](https://www.opensource.org/licenses/mit-license.php).

View File

@@ -0,0 +1,3 @@
import { BaseAttributeWrapper } from './Attribute';
export default class SpreadAttributeWrapper extends BaseAttributeWrapper {
}

View File

@@ -0,0 +1 @@
{"name":"isarray","version":"2.0.5","files":{"package.json":{"checkedAt":1678883671904,"integrity":"sha512-b+O/YxxOP53G2mtjFeYycMVEyJwaBigr8ZreQ+H1Ko6LDb4kBblW4c8PtXnkebDq7pSLMcuu2vNu+DEs6/GhhQ==","mode":420,"size":991},"index.js":{"checkedAt":1678883671904,"integrity":"sha512-C7ocRFcqFHF++0lOjwDWfqn/QMxJ2c3bJtpiCUWI7dD1fiWtU7K4t5j/8G2BaJu1Coe96HcbB3eKhW71Fct2rw==","mode":420,"size":132},"LICENSE":{"checkedAt":1678883671904,"integrity":"sha512-CwBouL62hk27aXHZ/hZdLV/UILzW17u9j0JYnrmBv5XYVN8tFsIdN46m1I9WI0XS9m3g/RcTTf+oSV60lubf8A==","mode":420,"size":1096},"README.md":{"checkedAt":1678883671904,"integrity":"sha512-zRf7JcIuwL/Fyay0ftwCYvS+hM2ZpInoK+i4yMpyAtjzvakPbGFDlVMFBNwo9DUYRQAJAuumeErxVPGyExdz/Q==","mode":420,"size":1211}}}

View File

@@ -0,0 +1,20 @@
import { Observable } from '../Observable';
import { isFunction } from '../util/isFunction';
import { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';
export function fromEventPattern(addHandler, removeHandler, resultSelector) {
if (resultSelector) {
return fromEventPattern(addHandler, removeHandler).pipe(mapOneOrManyArgs(resultSelector));
}
return new Observable(function (subscriber) {
var handler = function () {
var e = [];
for (var _i = 0; _i < arguments.length; _i++) {
e[_i] = arguments[_i];
}
return subscriber.next(e.length === 1 ? e[0] : e);
};
var retValue = addHandler(handler);
return isFunction(removeHandler) ? function () { return removeHandler(handler, retValue); } : undefined;
});
}
//# sourceMappingURL=fromEventPattern.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"count.js","sourceRoot":"","sources":["../../../../src/internal/operators/count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAyDlC,MAAM,UAAU,KAAK,CAAI,SAAgD;IACvE,OAAO,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;AACjG,CAAC"}

View File

@@ -0,0 +1,16 @@
var Uint8Array = require('./_Uint8Array');
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
module.exports = cloneArrayBuffer;

View File

@@ -0,0 +1 @@
{"version":3,"file":"tap.js","sourceRoot":"","sources":["../../../../src/internal/operators/tap.ts"],"names":[],"mappings":";;;AACA,iDAAgD;AAChD,qCAAuC;AACvC,2DAAgE;AAChE,6CAA4C;AAoG5C,SAAgB,GAAG,CACjB,cAAsE,EACtE,KAAiC,EACjC,QAA8B;IAK9B,IAAM,WAAW,GACf,uBAAU,CAAC,cAAc,CAAC,IAAI,KAAK,IAAI,QAAQ;QAC7C,CAAC;YACE,EAAE,IAAI,EAAE,cAAyE,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAA8B;QACnI,CAAC,CAAC,cAAc,CAAC;IAErB,OAAO,WAAW;QAChB,CAAC,CAAC,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;;YACzB,MAAA,WAAW,CAAC,SAAS,+CAArB,WAAW,CAAc,CAAC;YAC1B,IAAI,OAAO,GAAG,IAAI,CAAC;YACnB,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAK;;gBACJ,MAAA,WAAW,CAAC,IAAI,+CAAhB,WAAW,EAAQ,KAAK,CAAC,CAAC;gBAC1B,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC,EACD;;gBACE,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;gBACzB,UAAU,CAAC,QAAQ,EAAE,CAAC;YACxB,CAAC,EACD,UAAC,GAAG;;gBACF,OAAO,GAAG,KAAK,CAAC;gBAChB,MAAA,WAAW,CAAC,KAAK,+CAAjB,WAAW,EAAS,GAAG,CAAC,CAAC;gBACzB,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACxB,CAAC,EACD;;gBACE,IAAI,OAAO,EAAE;oBACX,MAAA,WAAW,CAAC,WAAW,+CAAvB,WAAW,CAAgB,CAAC;iBAC7B;gBACD,MAAA,WAAW,CAAC,QAAQ,+CAApB,WAAW,CAAa,CAAC;YAC3B,CAAC,CACF,CACF,CAAC;QACJ,CAAC,CAAC;QACJ,CAAC;YAGC,mBAAQ,CAAC;AACf,CAAC;AAhDD,kBAgDC"}

View File

@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [ "es5" ],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,
"baseUrl": ".",
"paths": { "frac": ["."] },
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
}
}

View File

@@ -0,0 +1,34 @@
import { Observable } from '../../Observable';
import { performanceTimestampProvider } from '../../scheduler/performanceTimestampProvider';
import { animationFrameProvider } from '../../scheduler/animationFrameProvider';
export function animationFrames(timestampProvider) {
return timestampProvider ? animationFramesFactory(timestampProvider) : DEFAULT_ANIMATION_FRAMES;
}
function animationFramesFactory(timestampProvider) {
return new Observable(function (subscriber) {
var provider = timestampProvider || performanceTimestampProvider;
var start = provider.now();
var id = 0;
var run = function () {
if (!subscriber.closed) {
id = animationFrameProvider.requestAnimationFrame(function (timestamp) {
id = 0;
var now = provider.now();
subscriber.next({
timestamp: timestampProvider ? now : timestamp,
elapsed: now - start,
});
run();
});
}
};
run();
return function () {
if (id) {
animationFrameProvider.cancelAnimationFrame(id);
}
};
});
}
var DEFAULT_ANIMATION_FRAMES = animationFramesFactory();
//# sourceMappingURL=animationFrames.js.map

View File

@@ -0,0 +1,56 @@
import type { CreateUser } from '../models/CreateUser';
import type { ResponseEmpty } from '../models/ResponseEmpty';
import type { ResponseUser } from '../models/ResponseUser';
import type { UpdateUser } from '../models/UpdateUser';
export declare class UserService {
/**
* Get all
* Lists all users. <br> This includes their groups and permissions granted to them.
* @result ResponseUser
* @throws ApiError
*/
static userControllerGetAll(): Promise<Array<ResponseUser>>;
/**
* Post
* Create a new user. <br> If you want to grant permissions to the user you have to create them seperately by posting to /api/permissions after creating the user.
* @param requestBody CreateUser
* @result ResponseUser
* @throws ApiError
*/
static userControllerPost(requestBody?: CreateUser): Promise<ResponseUser>;
/**
* Get one
* Lists all information about the user whose id got provided. <br> Please remember that all permissions granted to the user will show up here.
* @param id
* @result ResponseUser
* @throws ApiError
*/
static userControllerGetOne(id: number): Promise<ResponseUser>;
/**
* Put
* Update the user whose id you provided. <br> To change the permissions directly granted to the user please use /api/permissions instead. <br> Please remember that ids can't be changed.
* @param id
* @param requestBody UpdateUser
* @result ResponseUser
* @throws ApiError
*/
static userControllerPut(id: number, requestBody?: UpdateUser): Promise<ResponseUser>;
/**
* Remove
* Delete the user whose id you provided. <br> You have to confirm your decision by providing the ?force=true query param. <br> If there are any permissions directly granted to the user they will get deleted as well. <br> If no user with this id exists it will just return 204(no content).
* @param id
* @param force
* @result ResponseUser
* @result ResponseEmpty
* @throws ApiError
*/
static userControllerRemove(id: number, force?: boolean): Promise<ResponseUser | ResponseEmpty>;
/**
* Get permissions
* Lists all permissions granted to the user sorted into directly granted and inherited as permission response objects.
* @param id
* @result ResponseUser
* @throws ApiError
*/
static userControllerGetPermissions(id: number): Promise<ResponseUser>;
}

View File

@@ -0,0 +1,678 @@
/**
* Much of the Node.js core API is built around an idiomatic asynchronous
* event-driven architecture in which certain kinds of objects (called "emitters")
* emit named events that cause `Function` objects ("listeners") to be called.
*
* For instance: a `net.Server` object emits an event each time a peer
* connects to it; a `fs.ReadStream` emits an event when the file is opened;
* a `stream` emits an event whenever data is available to be read.
*
* All objects that emit events are instances of the `EventEmitter` class. These
* objects expose an `eventEmitter.on()` function that allows one or more
* functions to be attached to named events emitted by the object. Typically,
* event names are camel-cased strings but any valid JavaScript property key
* can be used.
*
* When the `EventEmitter` object emits an event, all of the functions attached
* to that specific event are called _synchronously_. Any values returned by the
* called listeners are _ignored_ and discarded.
*
* The following example shows a simple `EventEmitter` instance with a single
* listener. The `eventEmitter.on()` method is used to register listeners, while
* the `eventEmitter.emit()` method is used to trigger the event.
*
* ```js
* const EventEmitter = require('events');
*
* class MyEmitter extends EventEmitter {}
*
* const myEmitter = new MyEmitter();
* myEmitter.on('event', () => {
* console.log('an event occurred!');
* });
* myEmitter.emit('event');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
*/
declare module 'events' {
// NOTE: This class is in the docs but is **not actually exported** by Node.
// If https://github.com/nodejs/node/issues/39903 gets resolved and Node
// actually starts exporting the class, uncomment below.
// import { EventListener, EventListenerObject } from '__dom-events';
// /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */
// interface NodeEventTarget extends EventTarget {
// /**
// * Node.js-specific extension to the `EventTarget` class that emulates the equivalent `EventEmitter` API.
// * The only difference between `addListener()` and `addEventListener()` is that addListener() will return a reference to the EventTarget.
// */
// addListener(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
// /** Node.js-specific extension to the `EventTarget` class that returns an array of event `type` names for which event listeners are registered. */
// eventNames(): string[];
// /** Node.js-specific extension to the `EventTarget` class that returns the number of event listeners registered for the `type`. */
// listenerCount(type: string): number;
// /** Node.js-specific alias for `eventTarget.removeListener()`. */
// off(type: string, listener: EventListener | EventListenerObject): this;
// /** Node.js-specific alias for `eventTarget.addListener()`. */
// on(type: string, listener: EventListener | EventListenerObject, options?: { once: boolean }): this;
// /** Node.js-specific extension to the `EventTarget` class that adds a `once` listener for the given event `type`. This is equivalent to calling `on` with the `once` option set to `true`. */
// once(type: string, listener: EventListener | EventListenerObject): this;
// /**
// * Node.js-specific extension to the `EventTarget` class.
// * If `type` is specified, removes all registered listeners for `type`,
// * otherwise removes all registered listeners.
// */
// removeAllListeners(type: string): this;
// /**
// * Node.js-specific extension to the `EventTarget` class that removes the listener for the given `type`.
// * The only difference between `removeListener()` and `removeEventListener()` is that `removeListener()` will return a reference to the `EventTarget`.
// */
// removeListener(type: string, listener: EventListener | EventListenerObject): this;
// }
interface EventEmitterOptions {
/**
* Enables automatic capturing of promise rejection.
*/
captureRejections?: boolean | undefined;
}
// Any EventTarget with a Node-style `once` function
interface _NodeEventTarget {
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
}
// Any EventTarget with a DOM-style `addEventListener`
interface _DOMEventTarget {
addEventListener(
eventName: string,
listener: (...args: any[]) => void,
opts?: {
once: boolean;
}
): any;
}
interface StaticEventEmitterOptions {
signal?: AbortSignal | undefined;
}
interface EventEmitter extends NodeJS.EventEmitter {}
/**
* The `EventEmitter` class is defined and exposed by the `events` module:
*
* ```js
* const EventEmitter = require('events');
* ```
*
* All `EventEmitter`s emit the event `'newListener'` when new listeners are
* added and `'removeListener'` when existing listeners are removed.
*
* It supports the following option:
* @since v0.1.26
*/
class EventEmitter {
constructor(options?: EventEmitterOptions);
/**
* Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
* event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
* The `Promise` will resolve with an array of all the arguments emitted to the
* given event.
*
* This method is intentionally generic and works with the web platform [EventTarget](https://dom.spec.whatwg.org/#interface-eventtarget) interface, which has no special`'error'` event
* semantics and does not listen to the `'error'` event.
*
* ```js
* const { once, EventEmitter } = require('events');
*
* async function run() {
* const ee = new EventEmitter();
*
* process.nextTick(() => {
* ee.emit('myevent', 42);
* });
*
* const [value] = await once(ee, 'myevent');
* console.log(value);
*
* const err = new Error('kaboom');
* process.nextTick(() => {
* ee.emit('error', err);
* });
*
* try {
* await once(ee, 'myevent');
* } catch (err) {
* console.log('error happened', err);
* }
* }
*
* run();
* ```
*
* The special handling of the `'error'` event is only used when `events.once()`is used to wait for another event. If `events.once()` is used to wait for the
* '`error'` event itself, then it is treated as any other kind of event without
* special handling:
*
* ```js
* const { EventEmitter, once } = require('events');
*
* const ee = new EventEmitter();
*
* once(ee, 'error')
* .then(([err]) => console.log('ok', err.message))
* .catch((err) => console.log('error', err.message));
*
* ee.emit('error', new Error('boom'));
*
* // Prints: ok boom
* ```
*
* An `AbortSignal` can be used to cancel waiting for the event:
*
* ```js
* const { EventEmitter, once } = require('events');
*
* const ee = new EventEmitter();
* const ac = new AbortController();
*
* async function foo(emitter, event, signal) {
* try {
* await once(emitter, event, { signal });
* console.log('event emitted!');
* } catch (error) {
* if (error.name === 'AbortError') {
* console.error('Waiting for the event was canceled!');
* } else {
* console.error('There was an error', error.message);
* }
* }
* }
*
* foo(ee, 'foo', ac.signal);
* ac.abort(); // Abort waiting for the event
* ee.emit('foo'); // Prints: Waiting for the event was canceled!
* ```
* @since v11.13.0, v10.16.0
*/
static once(emitter: _NodeEventTarget, eventName: string | symbol, options?: StaticEventEmitterOptions): Promise<any[]>;
static once(emitter: _DOMEventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
/**
* ```js
* const { on, EventEmitter } = require('events');
*
* (async () => {
* const ee = new EventEmitter();
*
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
*
* for await (const event of on(ee, 'foo')) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* })();
* ```
*
* Returns an `AsyncIterator` that iterates `eventName` events. It will throw
* if the `EventEmitter` emits `'error'`. It removes all listeners when
* exiting the loop. The `value` returned by each iteration is an array
* composed of the emitted event arguments.
*
* An `AbortSignal` can be used to cancel waiting on events:
*
* ```js
* const { on, EventEmitter } = require('events');
* const ac = new AbortController();
*
* (async () => {
* const ee = new EventEmitter();
*
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
*
* for await (const event of on(ee, 'foo', { signal: ac.signal })) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* })();
*
* process.nextTick(() => ac.abort());
* ```
* @since v13.6.0, v12.16.0
* @param eventName The name of the event being listened for
* @return that iterates `eventName` events emitted by the `emitter`
*/
static on(emitter: NodeJS.EventEmitter, eventName: string, options?: StaticEventEmitterOptions): AsyncIterableIterator<any>;
/**
* A class method that returns the number of listeners for the given `eventName`registered on the given `emitter`.
*
* ```js
* const { EventEmitter, listenerCount } = require('events');
* const myEmitter = new EventEmitter();
* myEmitter.on('event', () => {});
* myEmitter.on('event', () => {});
* console.log(listenerCount(myEmitter, 'event'));
* // Prints: 2
* ```
* @since v0.9.12
* @deprecated Since v3.2.0 - Use `listenerCount` instead.
* @param emitter The emitter to query
* @param eventName The event name
*/
static listenerCount(emitter: NodeJS.EventEmitter, eventName: string | symbol): number;
/**
* Returns a copy of the array of listeners for the event named `eventName`.
*
* For `EventEmitter`s this behaves exactly the same as calling `.listeners` on
* the emitter.
*
* For `EventTarget`s this is the only way to get the event listeners for the
* event target. This is useful for debugging and diagnostic purposes.
*
* ```js
* const { getEventListeners, EventEmitter } = require('events');
*
* {
* const ee = new EventEmitter();
* const listener = () => console.log('Events are fun');
* ee.on('foo', listener);
* getEventListeners(ee, 'foo'); // [listener]
* }
* {
* const et = new EventTarget();
* const listener = () => console.log('Events are fun');
* et.addEventListener('foo', listener);
* getEventListeners(et, 'foo'); // [listener]
* }
* ```
* @since v15.2.0, v14.17.0
*/
static getEventListeners(emitter: _DOMEventTarget | NodeJS.EventEmitter, name: string | symbol): Function[];
/**
* ```js
* const {
* setMaxListeners,
* EventEmitter
* } = require('events');
*
* const target = new EventTarget();
* const emitter = new EventEmitter();
*
* setMaxListeners(5, target, emitter);
* ```
* @since v15.4.0
* @param n A non-negative number. The maximum number of listeners per `EventTarget` event.
* @param eventsTargets Zero or more {EventTarget} or {EventEmitter} instances. If none are specified, `n` is set as the default max for all newly created {EventTarget} and {EventEmitter}
* objects.
*/
static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
/**
* This symbol shall be used to install a listener for only monitoring `'error'`
* events. Listeners installed using this symbol are called before the regular
* `'error'` listeners are called.
*
* Installing a listener using this symbol does not change the behavior once an
* `'error'` event is emitted, therefore the process will still crash if no
* regular `'error'` listener is installed.
*/
static readonly errorMonitor: unique symbol;
static readonly captureRejectionSymbol: unique symbol;
/**
* Sets or gets the default captureRejection value for all emitters.
*/
// TODO: These should be described using static getter/setter pairs:
static captureRejections: boolean;
static defaultMaxListeners: number;
}
import internal = require('node:events');
namespace EventEmitter {
// Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
export { internal as EventEmitter };
export interface Abortable {
/**
* When provided the corresponding `AbortController` can be used to cancel an asynchronous action.
*/
signal?: AbortSignal | undefined;
}
}
global {
namespace NodeJS {
interface EventEmitter {
/**
* Alias for `emitter.on(eventName, listener)`.
* @since v0.1.26
*/
addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds the `listener` function to the end of the listeners array for the
* event named `eventName`. No checks are made to see if the `listener` has
* already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
* times.
*
* ```js
* server.on('connection', (stream) => {
* console.log('someone connected!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
*
* By default, event listeners are invoked in the order they are added. The`emitter.prependListener()` method can be used as an alternative to add the
* event listener to the beginning of the listeners array.
*
* ```js
* const myEE = new EventEmitter();
* myEE.on('foo', () => console.log('a'));
* myEE.prependListener('foo', () => console.log('b'));
* myEE.emit('foo');
* // Prints:
* // b
* // a
* ```
* @since v0.1.101
* @param eventName The name of the event.
* @param listener The callback function
*/
on(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds a **one-time**`listener` function for the event named `eventName`. The
* next time `eventName` is triggered, this listener is removed and then invoked.
*
* ```js
* server.once('connection', (stream) => {
* console.log('Ah, we have our first user!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
*
* By default, event listeners are invoked in the order they are added. The`emitter.prependOnceListener()` method can be used as an alternative to add the
* event listener to the beginning of the listeners array.
*
* ```js
* const myEE = new EventEmitter();
* myEE.once('foo', () => console.log('a'));
* myEE.prependOnceListener('foo', () => console.log('b'));
* myEE.emit('foo');
* // Prints:
* // b
* // a
* ```
* @since v0.3.0
* @param eventName The name of the event.
* @param listener The callback function
*/
once(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Removes the specified `listener` from the listener array for the event named`eventName`.
*
* ```js
* const callback = (stream) => {
* console.log('someone connected!');
* };
* server.on('connection', callback);
* // ...
* server.removeListener('connection', callback);
* ```
*
* `removeListener()` will remove, at most, one instance of a listener from the
* listener array. If any single listener has been added multiple times to the
* listener array for the specified `eventName`, then `removeListener()` must be
* called multiple times to remove each instance.
*
* Once an event is emitted, all listeners attached to it at the
* time of emitting are called in order. This implies that any`removeListener()` or `removeAllListeners()` calls _after_ emitting and _before_ the last listener finishes execution
* will not remove them from`emit()` in progress. Subsequent events behave as expected.
*
* ```js
* const myEmitter = new MyEmitter();
*
* const callbackA = () => {
* console.log('A');
* myEmitter.removeListener('event', callbackB);
* };
*
* const callbackB = () => {
* console.log('B');
* };
*
* myEmitter.on('event', callbackA);
*
* myEmitter.on('event', callbackB);
*
* // callbackA removes listener callbackB but it will still be called.
* // Internal listener array at time of emit [callbackA, callbackB]
* myEmitter.emit('event');
* // Prints:
* // A
* // B
*
* // callbackB is now removed.
* // Internal listener array [callbackA]
* myEmitter.emit('event');
* // Prints:
* // A
* ```
*
* Because listeners are managed using an internal array, calling this will
* change the position indices of any listener registered _after_ the listener
* being removed. This will not impact the order in which listeners are called,
* but it means that any copies of the listener array as returned by
* the `emitter.listeners()` method will need to be recreated.
*
* When a single function has been added as a handler multiple times for a single
* event (as in the example below), `removeListener()` will remove the most
* recently added instance. In the example the `once('ping')`listener is removed:
*
* ```js
* const ee = new EventEmitter();
*
* function pong() {
* console.log('pong');
* }
*
* ee.on('ping', pong);
* ee.once('ping', pong);
* ee.removeListener('ping', pong);
*
* ee.emit('ping');
* ee.emit('ping');
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v0.1.26
*/
removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Alias for `emitter.removeListener()`.
* @since v10.0.0
*/
off(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Removes all listeners, or those of the specified `eventName`.
*
* It is bad practice to remove listeners added elsewhere in the code,
* particularly when the `EventEmitter` instance was created by some other
* component or module (e.g. sockets or file streams).
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v0.1.26
*/
removeAllListeners(event?: string | symbol): this;
/**
* By default `EventEmitter`s will print a warning if more than `10` listeners are
* added for a particular event. This is a useful default that helps finding
* memory leaks. The `emitter.setMaxListeners()` method allows the limit to be
* modified for this specific `EventEmitter` instance. The value can be set to`Infinity` (or `0`) to indicate an unlimited number of listeners.
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v0.3.5
*/
setMaxListeners(n: number): this;
/**
* Returns the current max listener value for the `EventEmitter` which is either
* set by `emitter.setMaxListeners(n)` or defaults to {@link defaultMaxListeners}.
* @since v1.0.0
*/
getMaxListeners(): number;
/**
* Returns a copy of the array of listeners for the event named `eventName`.
*
* ```js
* server.on('connection', (stream) => {
* console.log('someone connected!');
* });
* console.log(util.inspect(server.listeners('connection')));
* // Prints: [ [Function] ]
* ```
* @since v0.1.26
*/
listeners(eventName: string | symbol): Function[];
/**
* Returns a copy of the array of listeners for the event named `eventName`,
* including any wrappers (such as those created by `.once()`).
*
* ```js
* const emitter = new EventEmitter();
* emitter.once('log', () => console.log('log once'));
*
* // Returns a new Array with a function `onceWrapper` which has a property
* // `listener` which contains the original listener bound above
* const listeners = emitter.rawListeners('log');
* const logFnWrapper = listeners[0];
*
* // Logs "log once" to the console and does not unbind the `once` event
* logFnWrapper.listener();
*
* // Logs "log once" to the console and removes the listener
* logFnWrapper();
*
* emitter.on('log', () => console.log('log persistently'));
* // Will return a new Array with a single function bound by `.on()` above
* const newListeners = emitter.rawListeners('log');
*
* // Logs "log persistently" twice
* newListeners[0]();
* emitter.emit('log');
* ```
* @since v9.4.0
*/
rawListeners(eventName: string | symbol): Function[];
/**
* Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments
* to each.
*
* Returns `true` if the event had listeners, `false` otherwise.
*
* ```js
* const EventEmitter = require('events');
* const myEmitter = new EventEmitter();
*
* // First listener
* myEmitter.on('event', function firstListener() {
* console.log('Helloooo! first listener');
* });
* // Second listener
* myEmitter.on('event', function secondListener(arg1, arg2) {
* console.log(`event with parameters ${arg1}, ${arg2} in second listener`);
* });
* // Third listener
* myEmitter.on('event', function thirdListener(...args) {
* const parameters = args.join(', ');
* console.log(`event with parameters ${parameters} in third listener`);
* });
*
* console.log(myEmitter.listeners('event'));
*
* myEmitter.emit('event', 1, 2, 3, 4, 5);
*
* // Prints:
* // [
* // [Function: firstListener],
* // [Function: secondListener],
* // [Function: thirdListener]
* // ]
* // Helloooo! first listener
* // event with parameters 1, 2 in second listener
* // event with parameters 1, 2, 3, 4, 5 in third listener
* ```
* @since v0.1.26
*/
emit(eventName: string | symbol, ...args: any[]): boolean;
/**
* Returns the number of listeners listening to the event named `eventName`.
* @since v3.2.0
* @param eventName The name of the event being listened for
*/
listenerCount(eventName: string | symbol): number;
/**
* Adds the `listener` function to the _beginning_ of the listeners array for the
* event named `eventName`. No checks are made to see if the `listener` has
* already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple
* times.
*
* ```js
* server.prependListener('connection', (stream) => {
* console.log('someone connected!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v6.0.0
* @param eventName The name of the event.
* @param listener The callback function
*/
prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Adds a **one-time**`listener` function for the event named `eventName` to the _beginning_ of the listeners array. The next time `eventName` is triggered, this
* listener is removed, and then invoked.
*
* ```js
* server.prependOnceListener('connection', (stream) => {
* console.log('Ah, we have our first user!');
* });
* ```
*
* Returns a reference to the `EventEmitter`, so that calls can be chained.
* @since v6.0.0
* @param eventName The name of the event.
* @param listener The callback function
*/
prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
/**
* Returns an array listing the events for which the emitter has registered
* listeners. The values in the array are strings or `Symbol`s.
*
* ```js
* const EventEmitter = require('events');
* const myEE = new EventEmitter();
* myEE.on('foo', () => {});
* myEE.on('bar', () => {});
*
* const sym = Symbol('symbol');
* myEE.on(sym, () => {});
*
* console.log(myEE.eventNames());
* // Prints: [ 'foo', 'bar', Symbol(symbol) ]
* ```
* @since v6.0.0
*/
eventNames(): Array<string | symbol>;
}
}
}
export = EventEmitter;
}
declare module 'node:events' {
import events = require('events');
export = events;
}

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = ltrim;
var _assertString = _interopRequireDefault(require("./util/assertString"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function ltrim(str, chars) {
(0, _assertString.default)(str); // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
var pattern = chars ? new RegExp("^[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+"), 'g') : /^\s+/g;
return str.replace(pattern, '');
}
module.exports = exports.default;
module.exports.default = exports.default;

View File

@@ -0,0 +1,14 @@
"use strict";
var callable = require("./valid-callable")
, forEach = require("./for-each")
, call = Function.prototype.call;
module.exports = function (obj, cb /*, thisArg*/) {
var result = {}, thisArg = arguments[2];
callable(cb);
forEach(obj, function (value, key, targetObj, index) {
if (call.call(cb, thisArg, value, key, targetObj, index)) result[key] = targetObj[key];
});
return result;
};

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').anySeries;

View File

@@ -0,0 +1,30 @@
var castFunction = require('./_castFunction'),
partial = require('./partial');
/**
* Creates a function that provides `value` to `wrapper` as its first
* argument. Any additional arguments provided to the function are appended
* to those provided to the `wrapper`. The wrapper is invoked with the `this`
* binding of the created function.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {*} value The value to wrap.
* @param {Function} [wrapper=identity] The wrapper function.
* @returns {Function} Returns the new function.
* @example
*
* var p = _.wrap(_.escape, function(func, text) {
* return '<p>' + func(text) + '</p>';
* });
*
* p('fred, barney, & pebbles');
* // => '<p>fred, barney, &amp; pebbles</p>'
*/
function wrap(value, wrapper) {
return partial(castFunction(wrapper), value);
}
module.exports = wrap;

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('sortedIndexBy', require('../sortedIndexBy'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"2":"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":"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","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 AB 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":"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","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 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:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","2":"F B C G M N O w 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","4":"z","16":"0 g x y"},G:{"2":"E zB UC BC 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"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"1":"I wC xC yC zC 0C 0B","2":"g 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"1":"AD","2":"BD"}},B:6,C:"HTTP Public Key Pinning"};

View File

@@ -0,0 +1,39 @@
'use strict';
exports.__esModule = true;
var _utils = require('../utils');
exports['default'] = function (instance) {
instance.registerHelper('blockHelperMissing', function (context, options) {
var inverse = options.inverse,
fn = options.fn;
if (context === true) {
return fn(this);
} else if (context === false || context == null) {
return inverse(this);
} else if (_utils.isArray(context)) {
if (context.length > 0) {
if (options.ids) {
options.ids = [options.name];
}
return instance.helpers.each(context, options);
} else {
return inverse(this);
}
} else {
if (options.data && options.ids) {
var data = _utils.createFrame(options.data);
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
options = { data: data };
}
return fn(context, options);
}
});
};
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvYmxvY2staGVscGVyLW1pc3NpbmcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztxQkFBd0QsVUFBVTs7cUJBRW5ELFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsb0JBQW9CLEVBQUUsVUFBUyxPQUFPLEVBQUUsT0FBTyxFQUFFO0FBQ3ZFLFFBQUksT0FBTyxHQUFHLE9BQU8sQ0FBQyxPQUFPO1FBQzNCLEVBQUUsR0FBRyxPQUFPLENBQUMsRUFBRSxDQUFDOztBQUVsQixRQUFJLE9BQU8sS0FBSyxJQUFJLEVBQUU7QUFDcEIsYUFBTyxFQUFFLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDakIsTUFBTSxJQUFJLE9BQU8sS0FBSyxLQUFLLElBQUksT0FBTyxJQUFJLElBQUksRUFBRTtBQUMvQyxhQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN0QixNQUFNLElBQUksZUFBUSxPQUFPLENBQUMsRUFBRTtBQUMzQixVQUFJLE9BQU8sQ0FBQyxNQUFNLEdBQUcsQ0FBQyxFQUFFO0FBQ3RCLFlBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUNmLGlCQUFPLENBQUMsR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO1NBQzlCOztBQUVELGVBQU8sUUFBUSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLE9BQU8sQ0FBQyxDQUFDO09BQ2hELE1BQU07QUFDTCxlQUFPLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztPQUN0QjtLQUNGLE1BQU07QUFDTCxVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixZQUFJLElBQUksR0FBRyxtQkFBWSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDckMsWUFBSSxDQUFDLFdBQVcsR0FBRyx5QkFDakIsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLEVBQ3hCLE9BQU8sQ0FBQyxJQUFJLENBQ2IsQ0FBQztBQUNGLGVBQU8sR0FBRyxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsQ0FBQztPQUMxQjs7QUFFRCxhQUFPLEVBQUUsQ0FBQyxPQUFPLEVBQUUsT0FBTyxDQUFDLENBQUM7S0FDN0I7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJibG9jay1oZWxwZXItbWlzc2luZy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGFwcGVuZENvbnRleHRQYXRoLCBjcmVhdGVGcmFtZSwgaXNBcnJheSB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24oaW5zdGFuY2UpIHtcbiAgaW5zdGFuY2UucmVnaXN0ZXJIZWxwZXIoJ2Jsb2NrSGVscGVyTWlzc2luZycsIGZ1bmN0aW9uKGNvbnRleHQsIG9wdGlvbnMpIHtcbiAgICBsZXQgaW52ZXJzZSA9IG9wdGlvbnMuaW52ZXJzZSxcbiAgICAgIGZuID0gb3B0aW9ucy5mbjtcblxuICAgIGlmIChjb250ZXh0ID09PSB0cnVlKSB7XG4gICAgICByZXR1cm4gZm4odGhpcyk7XG4gICAgfSBlbHNlIGlmIChjb250ZXh0ID09PSBmYWxzZSB8fCBjb250ZXh0ID09IG51bGwpIHtcbiAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgIH0gZWxzZSBpZiAoaXNBcnJheShjb250ZXh0KSkge1xuICAgICAgaWYgKGNvbnRleHQubGVuZ3RoID4gMCkge1xuICAgICAgICBpZiAob3B0aW9ucy5pZHMpIHtcbiAgICAgICAgICBvcHRpb25zLmlkcyA9IFtvcHRpb25zLm5hbWVdO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGluc3RhbmNlLmhlbHBlcnMuZWFjaChjb250ZXh0LCBvcHRpb25zKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiBpbnZlcnNlKHRoaXMpO1xuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBpZiAob3B0aW9ucy5kYXRhICYmIG9wdGlvbnMuaWRzKSB7XG4gICAgICAgIGxldCBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLm5hbWVcbiAgICAgICAgKTtcbiAgICAgICAgb3B0aW9ucyA9IHsgZGF0YTogZGF0YSB9O1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwgb3B0aW9ucyk7XG4gICAgfVxuICB9KTtcbn1cbiJdfQ==

View File

@@ -0,0 +1,83 @@
# is-callable <sup>[![Version Badge][2]][1]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][5]][6]
[![dev dependency status][7]][8]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][11]][1]
Is this JS value callable? Works with Functions and GeneratorFunctions, despite ES6 @@toStringTag.
## Supported engines
Automatically tested in every minor version of node.
Manually tested in:
- Safari: v4 - v15 <sub>(4, 5, 5.1, 6.0.5, 6.2, 7.1, 8, 9.1.3, 10.1.2, 11.1.2, 12.1, 13.1.2, 14.1.2, 15.3, 15.6.1)</sub>
- Note: Safari 9 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable.
- Chrome: v15 - v81, v83 - v106<sub>(every integer version)</sub>
- Note: This includes Edge v80+ and Opera v15+, which matches Chrome
- Firefox: v3, v3.6, v4 - v105 <sub>(every integer version)</sub>
- Note: v45 - v54 has `class`, but `Function.prototype.toString` hides that progeny and makes them look like functions, so `class` constructors will be reported by this package as callable, when they are not in fact callable.
- Note: in v42 - v63, `Function.prototype.toString` throws on HTML element constructors, or a Proxy to a function
- Note: in v20 - v35, HTML element constructors are not callable, despite having typeof `function`.
- Note: in v19, `document.all` is not callable.
- IE: v6 - v11<sub>(every integer version</sub>
- Opera: v11.1, v11.5, v11.6, v12.1, v12.14, v12.15, v12.16, v15+ <sub>v15+ matches Chrome</sub>
## Example
```js
var isCallable = require('is-callable');
var assert = require('assert');
assert.notOk(isCallable(undefined));
assert.notOk(isCallable(null));
assert.notOk(isCallable(false));
assert.notOk(isCallable(true));
assert.notOk(isCallable([]));
assert.notOk(isCallable({}));
assert.notOk(isCallable(/a/g));
assert.notOk(isCallable(new RegExp('a', 'g')));
assert.notOk(isCallable(new Date()));
assert.notOk(isCallable(42));
assert.notOk(isCallable(NaN));
assert.notOk(isCallable(Infinity));
assert.notOk(isCallable(new Number(42)));
assert.notOk(isCallable('foo'));
assert.notOk(isCallable(Object('foo')));
assert.ok(isCallable(function () {}));
assert.ok(isCallable(function* () {}));
assert.ok(isCallable(x => x * x));
```
## Install
Install with
```
npm install is-callable
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[1]: https://npmjs.org/package/is-callable
[2]: https://versionbadg.es/inspect-js/is-callable.svg
[5]: https://david-dm.org/inspect-js/is-callable.svg
[6]: https://david-dm.org/inspect-js/is-callable
[7]: https://david-dm.org/inspect-js/is-callable/dev-status.svg
[8]: https://david-dm.org/inspect-js/is-callable#info=devDependencies
[11]: https://nodei.co/npm/is-callable.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/is-callable.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/is-callable.svg
[downloads-url]: https://npm-stat.com/charts.html?package=is-callable
[codecov-image]: https://codecov.io/gh/inspect-js/is-callable/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/inspect-js/is-callable/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/is-callable
[actions-url]: https://github.com/inspect-js/is-callable/actions

View File

@@ -0,0 +1 @@
{"version":3,"file":"Subscription.d.ts","sourceRoot":"","sources":["../../../src/internal/Subscription.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAkB,MAAM,SAAS,CAAC;AAG1E;;;;;;;;;;;GAWG;AACH,qBAAa,YAAa,YAAW,gBAAgB;IAyBvC,OAAO,CAAC,eAAe,CAAC;IAxBpC,kBAAkB;IAClB,OAAc,KAAK,eAId;IAEL;;OAEG;IACI,MAAM,UAAS;IAEtB,OAAO,CAAC,UAAU,CAA8C;IAEhE;;;OAGG;IACH,OAAO,CAAC,WAAW,CAA+C;IAElE;;;OAGG;gBACiB,eAAe,CAAC,SAAQ,IAAI,aAAA;IAEhD;;;;;OAKG;IACH,WAAW,IAAI,IAAI;IAmDnB;;;;;;;;;;;;;;;;;OAiBG;IACH,GAAG,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAsBlC;;;;OAIG;IACH,OAAO,CAAC,UAAU;IAKlB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IAKlB;;;OAGG;IACH,OAAO,CAAC,aAAa;IASrB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,EAAE,IAAI,CAAC,GAAG,IAAI;CAQrD;AAED,eAAO,MAAM,kBAAkB,cAAqB,CAAC;AAErD,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY,CAKhE"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"skip.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/skip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAElE"}

View File

@@ -0,0 +1,22 @@
var constant = require('./constant'),
defineProperty = require('./_defineProperty'),
identity = require('./identity');
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !defineProperty ? identity : function(func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
module.exports = baseSetToString;

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,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.00551,"65":0,"66":0,"67":0,"68":0.00275,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.00275,"99":0.00275,"100":0,"101":0.00275,"102":0.00275,"103":0.00275,"104":0,"105":0,"106":0.00275,"107":0.00275,"108":0.00826,"109":0.2285,"110":0.12939,"111":0,"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,"46":0,"47":0,"48":0,"49":0.00275,"50":0,"51":0.00275,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.00275,"65":0,"66":0,"67":0,"68":0,"69":0.00275,"70":0,"71":0,"72":0,"73":0,"74":0.00551,"75":0,"76":0,"77":0,"78":0,"79":0.00275,"80":0,"81":0.00275,"83":0.01101,"84":0,"85":0.00826,"86":0.00551,"87":0.01101,"88":0.00275,"89":0,"90":0,"91":0.00275,"92":0.00275,"93":0,"94":0,"95":0,"96":0,"97":0.00275,"98":0,"99":0.00275,"100":0.00275,"101":0.00275,"102":0.00275,"103":0.01377,"104":0.00551,"105":0.00275,"106":0.00826,"107":0.01377,"108":0.1872,"109":3.03931,"110":2.01795,"111":0.00551,"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.00275,"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.00275,"67":0.02202,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0.00275,"74":0.00275,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.00826,"94":0.13214,"95":0.05781,"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.00275,"17":0,"18":0.00275,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0.00275,"88":0,"89":0.00275,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0.00275,"98":0,"99":0,"100":0,"101":0,"102":0.00275,"103":0,"104":0,"105":0,"106":0,"107":0.00551,"108":0.01652,"109":0.19271,"110":0.2753},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.00551,"15":0.00551,_:"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.00275,"13.1":0.00826,"14.1":0.03854,"15.1":0.00275,"15.2-15.3":0.01377,"15.4":0.01101,"15.5":0.01927,"15.6":0.09636,"16.0":0.02753,"16.1":0.07433,"16.2":0.12113,"16.3":0.06883,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0,"6.0-6.1":0,"7.0-7.1":0.00954,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01591,"10.0-10.2":0,"10.3":0.01273,"11.0-11.2":0,"11.3-11.4":0.00318,"12.0-12.1":0,"12.2-12.5":0.28952,"13.0-13.1":0.00318,"13.2":0,"13.3":0.01273,"13.4-13.7":0.0859,"14.0-14.4":0.24498,"14.5-14.8":0.45179,"15.0-15.1":0.13681,"15.2-15.3":0.27362,"15.4":0.32452,"15.5":0.69041,"15.6":1.91214,"16.0":4.5274,"16.1":6.87224,"16.2":8.10033,"16.3":6.18819,"16.4":0.00954},P:{"4":0.03084,"20":0.44202,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.03084,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0.01028,"12.0":0,"13.0":0.01028,"14.0":0.01028,"15.0":0.01028,"16.0":0.02056,"17.0":0.02056,"18.0":0.03084,"19.0":0.83263},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.09826},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00275,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.67397},H:{"0":0.53516},L:{"0":59.02656},R:{_:"0"},M:{"0":0.14494},Q:{"13.1":0}};

View File

@@ -0,0 +1,111 @@
# npm-run-path
> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries
In [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm.
## Install
```sh
npm install npm-run-path
```
## Usage
```js
import childProcess from 'node:child_process';
import {npmRunPath, npmRunPathEnv} from 'npm-run-path';
console.log(process.env.PATH);
//=> '/usr/local/bin'
console.log(npmRunPath());
//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin'
// `foo` is a locally installed binary
childProcess.execFileSync('foo', {
env: npmRunPathEnv()
});
```
## API
### npmRunPath(options?)
Returns the augmented PATH string.
#### options
Type: `object`
##### cwd
Type: `string | URL`\
Default: `process.cwd()`
The working directory.
##### path
Type: `string`\
Default: [`PATH`](https://github.com/sindresorhus/path-key)
The PATH to be appended.
Set it to an empty string to exclude the default PATH.
##### execPath
Type: `string`\
Default: `process.execPath`
The path to the current Node.js executable. Its directory is pushed to the front of PATH.
This can be either an absolute path or a path relative to the [`cwd` option](#cwd).
### npmRunPathEnv(options?)
Returns the augmented [`process.env`](https://nodejs.org/api/process.html#process_process_env) object.
#### options
Type: `object`
##### cwd
Type: `string | URL`\
Default: `process.cwd()`
The working directory.
##### env
Type: `object`
Accepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options.
##### execPath
Type: `string`\
Default: `process.execPath`
The path to the Node.js executable to use in child processes if that is different from the current one. Its directory is pushed to the front of PATH.
This can be either an absolute path or a path relative to the [`cwd` option](#cwd).
## Related
- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module
- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-npm-run-path?utm_source=npm-npm-run-path&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View File

@@ -0,0 +1,37 @@
var arrayLikeKeys = require('./_arrayLikeKeys'),
baseKeys = require('./_baseKeys'),
isArrayLike = require('./isArrayLike');
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
module.exports = keys;

View File

@@ -0,0 +1,102 @@
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for csv2json/libs/core/defaultParsers/index.js</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> / <a href="index.html">csv2json/libs/core/defaultParsers</a> index.js
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/1</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Functions</span>
<span class='fraction'>0/0</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/1</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 low'></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></td><td class="line-coverage quiet"><span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span>
<span class="cline-any cline-no">0</span></td><td class="text"><pre class="prettyprint lang-js">Unable to lookup source: /Users/kxiang/work/projects/csv2json/libs/core/defaultParsers/index.js(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/libs/core/defaultParsers/index.js')
Error: Unable to lookup source: /Users/kxiang/work/projects/csv2json/libs/core/defaultParsers/index.js(ENOENT: no such file or directory, open '/Users/kxiang/work/projects/csv2json/libs/core/defaultParsers/index.js')
at Context.defaultSourceLookup [as sourceFinder] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:15:15)
at Context.getSource (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/context.js:74:17)
at Object.annotateSourceCode (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/annotator.js:172:38)
at HtmlReport.onDetail (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-reports/lib/html/index.js:237:39)
at Visitor.(anonymous function) [as onDetail] (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:34:30)
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:123:17)
at /Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:116:23
at Array.forEach (native)
at visitChildren (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:115:32)
at ReportNode.Node.visit (/Users/kxiang/work/projects/csv2json/node_modules/nyc/node_modules/istanbul-lib-report/lib/tree.js:126:5)</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 Fri May 11 2018 21:36:07 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,71 @@
'use strict';
function Sorter() {
}
Sorter.prototype.sort = function(tokens, fromIndex) {
fromIndex = fromIndex || 0;
for (var i = 0, len = this.keys.length; i < len; i++) {
var key = this.keys[i];
var token = key.slice(1);
var index = tokens.indexOf(token, fromIndex);
if (index !== -1) {
do {
if (index !== fromIndex) {
tokens.splice(index, 1);
tokens.splice(fromIndex, 0, token);
}
fromIndex++;
} while ((index = tokens.indexOf(token, fromIndex)) !== -1);
return this[key].sort(tokens, fromIndex);
}
}
return tokens;
};
function TokenChain() {
}
TokenChain.prototype = {
add: function(tokens) {
var self = this;
tokens.forEach(function(token) {
var key = '$' + token;
if (!self[key]) {
self[key] = [];
self[key].processed = 0;
}
self[key].push(tokens);
});
},
createSorter: function() {
var self = this;
var sorter = new Sorter();
sorter.keys = Object.keys(self).sort(function(j, k) {
var m = self[j].length;
var n = self[k].length;
return m < n ? 1 : m > n ? -1 : j < k ? -1 : j > k ? 1 : 0;
}).filter(function(key) {
if (self[key].processed < self[key].length) {
var token = key.slice(1);
var chain = new TokenChain();
self[key].forEach(function(tokens) {
var index;
while ((index = tokens.indexOf(token)) !== -1) {
tokens.splice(index, 1);
}
tokens.forEach(function(token) {
self['$' + token].processed++;
});
chain.add(tokens.slice(0));
});
sorter[key] = chain.createSorter();
return true;
}
return false;
});
return sorter;
}
};
module.exports = TokenChain;

View File

@@ -0,0 +1,55 @@
{
"name": "queue-microtask",
"description": "fast, tiny `queueMicrotask` shim for modern engines",
"version": "1.2.3",
"author": {
"name": "Feross Aboukhadijeh",
"email": "feross@feross.org",
"url": "https://feross.org"
},
"bugs": {
"url": "https://github.com/feross/queue-microtask/issues"
},
"devDependencies": {
"standard": "*",
"tape": "^5.2.2"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"homepage": "https://github.com/feross/queue-microtask",
"keywords": [
"asap",
"immediate",
"micro task",
"microtask",
"nextTick",
"process.nextTick",
"queue micro task",
"queue microtask",
"queue-microtask",
"queueMicrotask",
"setImmediate",
"task"
],
"license": "MIT",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/feross/queue-microtask.git"
},
"scripts": {
"test": "standard && tape test/*.js"
}
}

View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function bufFromString(str) {
var length = Buffer.byteLength(str);
var buffer = Buffer.allocUnsafe
? Buffer.allocUnsafe(length)
: new Buffer(length);
buffer.write(str);
return buffer;
}
exports.bufFromString = bufFromString;
function emptyBuffer() {
var buffer = Buffer.allocUnsafe
? Buffer.allocUnsafe(0)
: new Buffer(0);
return buffer;
}
exports.emptyBuffer = emptyBuffer;
function filterArray(arr, filter) {
var rtn = [];
for (var i = 0; i < arr.length; i++) {
if (filter.indexOf(i) > -1) {
rtn.push(arr[i]);
}
}
return rtn;
}
exports.filterArray = filterArray;
exports.trimLeft = String.prototype.trimLeft ? function trimLeftNative(str) {
return str.trimLeft();
} : function trimLeftRegExp(str) {
return str.replace(/^\s+/, "");
};
exports.trimRight = String.prototype.trimRight ? function trimRightNative(str) {
return str.trimRight();
} : function trimRightRegExp(str) {
return str.replace(/\s+$/, "");
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiL1VzZXJzL2t4aWFuZy93b3JrL3Byb2plY3RzL2NzdjJqc29uL3NyYy91dGlsLnRzIiwic291cmNlcyI6WyIvVXNlcnMva3hpYW5nL3dvcmsvcHJvamVjdHMvY3N2Mmpzb24vc3JjL3V0aWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx1QkFBOEIsR0FBVztJQUN2QyxJQUFNLE1BQU0sR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBQ3RDLElBQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxXQUFXO1FBQy9CLENBQUMsQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQztRQUM1QixDQUFDLENBQUMsSUFBSSxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDdkIsTUFBTSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQztJQUNsQixPQUFPLE1BQU0sQ0FBQztBQUNoQixDQUFDO0FBUEQsc0NBT0M7QUFFRDtJQUNFLElBQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxXQUFXO1FBQy9CLENBQUMsQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFDLENBQUMsQ0FBQztRQUN2QixDQUFDLENBQUMsSUFBSSxNQUFNLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDbEIsT0FBTyxNQUFNLENBQUM7QUFDaEIsQ0FBQztBQUxELGtDQUtDO0FBRUQscUJBQTRCLEdBQVUsRUFBRSxNQUFnQjtJQUN0RCxJQUFNLEdBQUcsR0FBVSxFQUFFLENBQUM7SUFDdEIsS0FBSyxJQUFJLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLEdBQUcsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFFLEVBQUU7UUFDbkMsSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFO1lBQzFCLEdBQUcsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUM7U0FDbEI7S0FDRjtJQUNELE9BQU8sR0FBRyxDQUFDO0FBQ2IsQ0FBQztBQVJELGtDQVFDO0FBRVksUUFBQSxRQUFRLEdBQUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxRQUFRLENBQUEsQ0FBQyxDQUFBLHdCQUF3QixHQUFVO0lBQ2hGLE9BQU8sR0FBRyxDQUFDLFFBQVEsRUFBRSxDQUFDO0FBQ3hCLENBQUMsQ0FBQSxDQUFDLENBQUEsd0JBQXdCLEdBQVU7SUFDbEMsT0FBTyxHQUFHLENBQUMsT0FBTyxDQUFDLE1BQU0sRUFBRSxFQUFFLENBQUMsQ0FBQztBQUNqQyxDQUFDLENBQUE7QUFFWSxRQUFBLFNBQVMsR0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLFNBQVMsQ0FBQSxDQUFDLENBQUEseUJBQXlCLEdBQVU7SUFDbkYsT0FBTyxHQUFHLENBQUMsU0FBUyxFQUFFLENBQUM7QUFDekIsQ0FBQyxDQUFBLENBQUMsQ0FBQSx5QkFBeUIsR0FBVTtJQUNuQyxPQUFPLEdBQUcsQ0FBQyxPQUFPLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQyxDQUFDO0FBQ2pDLENBQUMsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBidWZGcm9tU3RyaW5nKHN0cjogc3RyaW5nKTogQnVmZmVyIHtcbiAgY29uc3QgbGVuZ3RoID0gQnVmZmVyLmJ5dGVMZW5ndGgoc3RyKTtcbiAgY29uc3QgYnVmZmVyID0gQnVmZmVyLmFsbG9jVW5zYWZlXG4gICAgPyBCdWZmZXIuYWxsb2NVbnNhZmUobGVuZ3RoKVxuICAgIDogbmV3IEJ1ZmZlcihsZW5ndGgpO1xuICBidWZmZXIud3JpdGUoc3RyKTtcbiAgcmV0dXJuIGJ1ZmZlcjtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGVtcHR5QnVmZmVyKCk6IEJ1ZmZlcntcbiAgY29uc3QgYnVmZmVyID0gQnVmZmVyLmFsbG9jVW5zYWZlXG4gICAgPyBCdWZmZXIuYWxsb2NVbnNhZmUoMClcbiAgICA6IG5ldyBCdWZmZXIoMCk7XG4gIHJldHVybiBidWZmZXI7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBmaWx0ZXJBcnJheShhcnI6IGFueVtdLCBmaWx0ZXI6IG51bWJlcltdKTogYW55W10ge1xuICBjb25zdCBydG46IGFueVtdID0gW107XG4gIGZvciAobGV0IGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsgaSsrKSB7XG4gICAgaWYgKGZpbHRlci5pbmRleE9mKGkpID4gLTEpIHtcbiAgICAgIHJ0bi5wdXNoKGFycltpXSk7XG4gICAgfVxuICB9XG4gIHJldHVybiBydG47XG59XG5cbmV4cG9ydCBjb25zdCB0cmltTGVmdD1TdHJpbmcucHJvdG90eXBlLnRyaW1MZWZ0P2Z1bmN0aW9uIHRyaW1MZWZ0TmF0aXZlKHN0cjpzdHJpbmcpe1xuICByZXR1cm4gc3RyLnRyaW1MZWZ0KCk7XG59OmZ1bmN0aW9uIHRyaW1MZWZ0UmVnRXhwKHN0cjpzdHJpbmcpe1xuICByZXR1cm4gc3RyLnJlcGxhY2UoL15cXHMrLywgXCJcIik7XG59XG5cbmV4cG9ydCBjb25zdCB0cmltUmlnaHQ9U3RyaW5nLnByb3RvdHlwZS50cmltUmlnaHQ/ZnVuY3Rpb24gdHJpbVJpZ2h0TmF0aXZlKHN0cjpzdHJpbmcpe1xuICByZXR1cm4gc3RyLnRyaW1SaWdodCgpO1xufTpmdW5jdGlvbiB0cmltUmlnaHRSZWdFeHAoc3RyOnN0cmluZyl7XG4gIHJldHVybiBzdHIucmVwbGFjZSgvXFxzKyQvLCBcIlwiKTtcbn1cbiJdfQ==

View File

@@ -0,0 +1,57 @@
'use strict';
module.exports = {
MAX_LENGTH: 1024 * 64,
// Digits
CHAR_0: '0', /* 0 */
CHAR_9: '9', /* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: 'A', /* A */
CHAR_LOWERCASE_A: 'a', /* a */
CHAR_UPPERCASE_Z: 'Z', /* Z */
CHAR_LOWERCASE_Z: 'z', /* z */
CHAR_LEFT_PARENTHESES: '(', /* ( */
CHAR_RIGHT_PARENTHESES: ')', /* ) */
CHAR_ASTERISK: '*', /* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: '&', /* & */
CHAR_AT: '@', /* @ */
CHAR_BACKSLASH: '\\', /* \ */
CHAR_BACKTICK: '`', /* ` */
CHAR_CARRIAGE_RETURN: '\r', /* \r */
CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
CHAR_COLON: ':', /* : */
CHAR_COMMA: ',', /* , */
CHAR_DOLLAR: '$', /* . */
CHAR_DOT: '.', /* . */
CHAR_DOUBLE_QUOTE: '"', /* " */
CHAR_EQUAL: '=', /* = */
CHAR_EXCLAMATION_MARK: '!', /* ! */
CHAR_FORM_FEED: '\f', /* \f */
CHAR_FORWARD_SLASH: '/', /* / */
CHAR_HASH: '#', /* # */
CHAR_HYPHEN_MINUS: '-', /* - */
CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
CHAR_LEFT_CURLY_BRACE: '{', /* { */
CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
CHAR_LINE_FEED: '\n', /* \n */
CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
CHAR_PERCENT: '%', /* % */
CHAR_PLUS: '+', /* + */
CHAR_QUESTION_MARK: '?', /* ? */
CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
CHAR_RIGHT_CURLY_BRACE: '}', /* } */
CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
CHAR_SEMICOLON: ';', /* ; */
CHAR_SINGLE_QUOTE: '\'', /* ' */
CHAR_SPACE: ' ', /* */
CHAR_TAB: '\t', /* \t */
CHAR_UNDERSCORE: '_', /* _ */
CHAR_VERTICAL_LINE: '|', /* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
};