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,74 @@
# hash-sum
> blazing fast unique hash generator
# install
```shell
npm i hash-sum -S
```
# features
- no dependencies
- minimal footprint
- works in all of node.js, io.js, and the browser
- hashes functions based on their source code
- produces different hashes for different object types
- support for circular references in objects
- ignores property assignment order
# `sum(value)`
yields a four-byte hexadecimal hash based off of `value`.
```
# creates unique hashes
00a34759 from: [ 0, 1, 2, 3 ]
a8996f0c from: { '0': 0, '1': 1, '2': 2, '3': 3 }
5b4c2116 from: { '0': 0, '1': 1, '2': 2, '3': 3, length: 4 }
2c937c45 from: { url: 12 }
31d55010 from: { headers: 12 }
2d2e11bc from: { headers: 122 }
ec99d958 from: { headers: '122' }
18c00eee from: { headers: { accept: 'text/plain' } }
6cb332c8 from: { payload: [ 0, 1, 2, 3 ], headers: [ { a: 'b' } ] }
12ff55db from: { a: [Function: a] }
46f806d2 from: { b: [Function: b] }
0660d9c4 from: { b: [Function: b] }
6c95fc65 from: function () {}
2941766e from: function (a) {}
294f8def from: function (b) {}
2d9c0cb8 from: function (a) { return a;}
ed5c63fc from: function (a) {return a;}
bba68bf6 from: ''
2d27667d from: 'null'
774b96ed from: 'false'
2d2a1684 from: 'true'
8daa1a0c from: '0'
8daa1a0a from: '1'
e38f07cc from: 'void 0'
6037ea1a from: 'undefined'
9b7df12e from: null
3c206f76 from: false
01e34ba8 from: true
8a8f9624 from: Infinity
0315bf8f from: -Infinity
64a48b16 from: NaN
1a96284a from: 0
1a96284b from: 1
29172c1a from: undefined
59322f29 from: {}
095b3a22 from: { a: {}, b: {} }
63be56dd from: { valueOf: [Function: valueOf] }
63be4f5c from: { valueOf: [Function: valueOf] }
5d844489 from: []
ba0bfa14 from: 2019-06-28T21:24:31.215Z
49324d16 from: 2019-06-28T03:00:00.000Z
434c9188 from: 1988-06-09T03:00:00.000Z
ce1b5e44 from: global
```
# license
MIT

View File

@@ -0,0 +1 @@
{"name":"is-installed-globally","version":"0.4.0","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1678883672611,"integrity":"sha512-vcpj2JXTE4zOUQppmo3MwxSc9qWO9S4MP/sh1M7HxErS3ttMfUmAlysFy4K+GThybyt31po0VDgCLFVg15tX4g==","mode":420,"size":342},"package.json":{"checkedAt":1678883672611,"integrity":"sha512-k/tVDqFgAVewLsWlttKJVtrIeuah3WNTgIOrYkIjH0vZ/s2wdkq0owRXkgKyBeJPTtB2zTjJVJro2Ppp32KJJg==","mode":420,"size":940},"index.d.ts":{"checkedAt":1678883672611,"integrity":"sha512-MbsPkFyZUzAZtC+/GBh2EQ9rGL6tLMPxNy+lz4V2xfAKqp3GIldp5iA8Co4WG2HYkNNAL57hvemrq10O488Qyg==","mode":420,"size":379},"readme.md":{"checkedAt":1678883672611,"integrity":"sha512-qFJtFDYcisXngIjWBNQ/c6syNrodU3EmlQ5gyj1WfBdEu7NtQWr5SELeCzpnv767Llttmg+B+uZVQ/MpNR2xGw==","mode":420,"size":828}}}

View File

@@ -0,0 +1,2 @@
import { Processed } from './types';
export declare function decode_map(processed: Processed): any;

View File

@@ -0,0 +1,8 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const VERSION = "9.0.0";
exports.VERSION = VERSION;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,41 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.7 BLOCK -->
## Security
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
## Reporting Security Issues
**Please do not report security vulnerabilities through public GitHub issues.**
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly.
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
## Preferred Languages
We prefer all communications to be in English.
## Policy
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
<!-- END MICROSOFT SECURITY.MD BLOCK -->

View File

@@ -0,0 +1,78 @@
import { addQueryParameters } from "./util/add-query-parameters";
import { extractUrlVariableNames } from "./util/extract-url-variable-names";
import { omit } from "./util/omit";
import { parseUrl } from "./util/url-template";
export function parse(options) {
// https://fetch.spec.whatwg.org/#methods
let method = options.method.toUpperCase();
// replace :varname with {varname} to make it RFC 6570 compatible
let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}");
let headers = Object.assign({}, options.headers);
let body;
let parameters = omit(options, [
"method",
"baseUrl",
"url",
"headers",
"request",
"mediaType",
]);
// extract variable names from URL to calculate remaining variables later
const urlVariableNames = extractUrlVariableNames(url);
url = parseUrl(url).expand(parameters);
if (!/^http/.test(url)) {
url = options.baseUrl + url;
}
const omittedParameters = Object.keys(options)
.filter((option) => urlVariableNames.includes(option))
.concat("baseUrl");
const remainingParameters = omit(parameters, omittedParameters);
const isBinaryRequest = /application\/octet-stream/i.test(headers.accept);
if (!isBinaryRequest) {
if (options.mediaType.format) {
// e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw
headers.accept = headers.accept
.split(/,/)
.map((preview) => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`))
.join(",");
}
if (options.mediaType.previews.length) {
const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
headers.accept = previewsFromAcceptHeader
.concat(options.mediaType.previews)
.map((preview) => {
const format = options.mediaType.format
? `.${options.mediaType.format}`
: "+json";
return `application/vnd.github.${preview}-preview${format}`;
})
.join(",");
}
}
// for GET/HEAD requests, set URL query parameters from remaining parameters
// for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters
if (["GET", "HEAD"].includes(method)) {
url = addQueryParameters(url, remainingParameters);
}
else {
if ("data" in remainingParameters) {
body = remainingParameters.data;
}
else {
if (Object.keys(remainingParameters).length) {
body = remainingParameters;
}
}
}
// default content-type for JSON if body is set
if (!headers["content-type"] && typeof body !== "undefined") {
headers["content-type"] = "application/json; charset=utf-8";
}
// GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.
// fetch does not allow to set `content-length` header, but we can set body to an empty string
if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
body = "";
}
// Only return body/request keys if present
return Object.assign({ method, url, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null);
}

View File

@@ -0,0 +1,121 @@
# minimist <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
parse argument options
This module is the guts of optimist's argument parser without all the
fanciful decoration.
# example
``` js
var argv = require('minimist')(process.argv.slice(2));
console.log(argv);
```
```
$ node example/parse.js -a beep -b boop
{ _: [], a: 'beep', b: 'boop' }
```
```
$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz
{
_: ['foo', 'bar', 'baz'],
x: 3,
y: 4,
n: 5,
a: true,
b: true,
c: true,
beep: 'boop'
}
```
# security
Previous versions had a prototype pollution bug that could cause privilege
escalation in some circumstances when handling untrusted user input.
Please use version 1.2.6 or later:
* https://security.snyk.io/vuln/SNYK-JS-MINIMIST-2429795 (version <=1.2.5)
* https://snyk.io/vuln/SNYK-JS-MINIMIST-559764 (version <=1.2.3)
# methods
``` js
var parseArgs = require('minimist')
```
## var argv = parseArgs(args, opts={})
Return an argument object `argv` populated with the array arguments from `args`.
`argv._` contains all the arguments that didn't have an option associated with
them.
Numeric-looking arguments will be returned as numbers unless `opts.string` or
`opts.boolean` is set for that argument name.
Any arguments after `'--'` will not be parsed and will end up in `argv._`.
options can be:
* `opts.string` - a string or array of strings argument names to always treat as
strings
* `opts.boolean` - a boolean, string or array of strings to always treat as
booleans. if `true` will treat all double hyphenated arguments without equal signs
as boolean (e.g. affects `--foo`, not `-f` or `--foo=bar`)
* `opts.alias` - an object mapping string names to strings or arrays of string
argument names to use as aliases
* `opts.default` - an object mapping string argument names to default values
* `opts.stopEarly` - when true, populate `argv._` with everything after the
first non-option
* `opts['--']` - when true, populate `argv._` with everything before the `--`
and `argv['--']` with everything after the `--`. Here's an example:
```
> require('./')('one two three -- four five --six'.split(' '), { '--': true })
{
_: ['one', 'two', 'three'],
'--': ['four', 'five', '--six']
}
```
Note that with `opts['--']` set, parsing for arguments still stops after the
`--`.
* `opts.unknown` - a function which is invoked with a command line parameter not
defined in the `opts` configuration object. If the function returns `false`, the
unknown option is not added to `argv`.
# install
With [npm](https://npmjs.org) do:
```
npm install minimist
```
# license
MIT
[package-url]: https://npmjs.org/package/minimist
[npm-version-svg]: https://versionbadg.es/minimistjs/minimist.svg
[npm-badge-png]: https://nodei.co/npm/minimist.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/minimist.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/minimist.svg
[downloads-url]: https://npm-stat.com/charts.html?package=minimist
[codecov-image]: https://codecov.io/gh/minimistjs/minimist/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/minimistjs/minimist/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/minimistjs/minimist
[actions-url]: https://github.com/minimistjs/minimist/actions

View File

@@ -0,0 +1,13 @@
var clone = require('clone');
module.exports = function(options, defaults) {
options = options || {};
Object.keys(defaults).forEach(function(key) {
if (typeof options[key] === 'undefined') {
options[key] = clone(defaults[key]);
}
});
return options;
};

View File

@@ -0,0 +1,44 @@
{
"name": "electron-to-chromium",
"version": "1.4.299",
"description": "Provides a list of electron-to-chromium version mappings",
"main": "index.js",
"files": [
"versions.js",
"full-versions.js",
"chromium-versions.js",
"full-chromium-versions.js",
"versions.json",
"full-versions.json",
"chromium-versions.json",
"full-chromium-versions.json",
"LICENSE"
],
"scripts": {
"build": "node build.mjs",
"update": "node automated-update.js",
"test": "nyc ava --verbose",
"report": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
},
"repository": {
"type": "git",
"url": "https://github.com/kilian/electron-to-chromium/"
},
"keywords": [
"electron",
"chrome",
"chromium",
"browserslist",
"browserlist"
],
"author": "Kilian Valkhof",
"license": "ISC",
"devDependencies": {
"ava": "^5.1.1",
"codecov": "^3.8.2",
"compare-versions": "^6.0.0-rc.1",
"node-fetch": "^3.3.0",
"nyc": "^15.1.0",
"shelljs": "^0.8.5"
}
}

View File

@@ -0,0 +1,172 @@
/**
* Clean-css - https://github.com/jakubpawlowicz/clean-css
* Released under the terms of MIT license
*
* Copyright (C) 2017 JakubPawlowicz.com
*/
var level0Optimize = require('./optimizer/level-0/optimize');
var level1Optimize = require('./optimizer/level-1/optimize');
var level2Optimize = require('./optimizer/level-2/optimize');
var validator = require('./optimizer/validator');
var compatibilityFrom = require('./options/compatibility');
var fetchFrom = require('./options/fetch');
var formatFrom = require('./options/format').formatFrom;
var inlineFrom = require('./options/inline');
var inlineRequestFrom = require('./options/inline-request');
var inlineTimeoutFrom = require('./options/inline-timeout');
var OptimizationLevel = require('./options/optimization-level').OptimizationLevel;
var optimizationLevelFrom = require('./options/optimization-level').optimizationLevelFrom;
var rebaseFrom = require('./options/rebase');
var rebaseToFrom = require('./options/rebase-to');
var inputSourceMapTracker = require('./reader/input-source-map-tracker');
var readSources = require('./reader/read-sources');
var serializeStyles = require('./writer/simple');
var serializeStylesAndSourceMap = require('./writer/source-maps');
var CleanCSS = module.exports = function CleanCSS(options) {
options = options || {};
this.options = {
compatibility: compatibilityFrom(options.compatibility),
fetch: fetchFrom(options.fetch),
format: formatFrom(options.format),
inline: inlineFrom(options.inline),
inlineRequest: inlineRequestFrom(options.inlineRequest),
inlineTimeout: inlineTimeoutFrom(options.inlineTimeout),
level: optimizationLevelFrom(options.level),
rebase: rebaseFrom(options.rebase),
rebaseTo: rebaseToFrom(options.rebaseTo),
returnPromise: !!options.returnPromise,
sourceMap: !!options.sourceMap,
sourceMapInlineSources: !!options.sourceMapInlineSources
};
};
// for compatibility with optimize-css-assets-webpack-plugin
CleanCSS.process = function (input, opts) {
var cleanCss;
var optsTo = opts.to;
delete opts.to;
cleanCss = new CleanCSS(Object.assign({ returnPromise: true, rebaseTo: optsTo }, opts));
return cleanCss.minify(input)
.then(function(output) {
return { css: output.styles };
});
};
CleanCSS.prototype.minify = function (input, maybeSourceMap, maybeCallback) {
var options = this.options;
if (options.returnPromise) {
return new Promise(function (resolve, reject) {
minify(input, options, maybeSourceMap, function (errors, output) {
return errors ?
reject(errors) :
resolve(output);
});
});
} else {
return minify(input, options, maybeSourceMap, maybeCallback);
}
};
function minify(input, options, maybeSourceMap, maybeCallback) {
var sourceMap = typeof maybeSourceMap != 'function' ?
maybeSourceMap :
null;
var callback = typeof maybeCallback == 'function' ?
maybeCallback :
(typeof maybeSourceMap == 'function' ? maybeSourceMap : null);
var context = {
stats: {
efficiency: 0,
minifiedSize: 0,
originalSize: 0,
startedAt: Date.now(),
timeSpent: 0
},
cache: {
specificity: {}
},
errors: [],
inlinedStylesheets: [],
inputSourceMapTracker: inputSourceMapTracker(),
localOnly: !callback,
options: options,
source: null,
sourcesContent: {},
validator: validator(options.compatibility),
warnings: []
};
if (sourceMap) {
context.inputSourceMapTracker.track(undefined, sourceMap);
}
return runner(context.localOnly)(function () {
return readSources(input, context, function (tokens) {
var serialize = context.options.sourceMap ?
serializeStylesAndSourceMap :
serializeStyles;
var optimizedTokens = optimize(tokens, context);
var optimizedStyles = serialize(optimizedTokens, context);
var output = withMetadata(optimizedStyles, context);
return callback ?
callback(context.errors.length > 0 ? context.errors : null, output) :
output;
});
});
}
function runner(localOnly) {
// to always execute code asynchronously when a callback is given
// more at blog.izs.me/post/59142742143/designing-apis-for-asynchrony
return localOnly ?
function (callback) { return callback(); } :
process.nextTick;
}
function optimize(tokens, context) {
var optimized;
optimized = level0Optimize(tokens, context);
optimized = OptimizationLevel.One in context.options.level ?
level1Optimize(tokens, context) :
tokens;
optimized = OptimizationLevel.Two in context.options.level ?
level2Optimize(tokens, context, true) :
optimized;
return optimized;
}
function withMetadata(output, context) {
output.stats = calculateStatsFrom(output.styles, context);
output.errors = context.errors;
output.inlinedStylesheets = context.inlinedStylesheets;
output.warnings = context.warnings;
return output;
}
function calculateStatsFrom(styles, context) {
var finishedAt = Date.now();
var timeSpent = finishedAt - context.stats.startedAt;
delete context.stats.startedAt;
context.stats.timeSpent = timeSpent;
context.stats.efficiency = 1 - styles.length / context.stats.originalSize;
context.stats.minifiedSize = styles.length;
return context.stats;
}

View File

@@ -0,0 +1,74 @@
file-uri-to-path
================
### Convert a `file:` URI to a file path
[![Build Status](https://github.com/TooTallNate/file-uri-to-path/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/file-uri-to-path/actions?workflow=Node+CI)
Accepts a `file:` URI and returns a regular file path suitable for use with the
`fs` module functions.
Installation
------------
Install with `npm`:
``` bash
$ npm install file-uri-to-path
```
Example
-------
``` js
var uri2path = require('file-uri-to-path');
uri2path('file://localhost/c|/WINDOWS/clock.avi');
// "c:\\WINDOWS\\clock.avi"
uri2path('file:///c|/WINDOWS/clock.avi');
// "c:\\WINDOWS\\clock.avi"
uri2path('file://localhost/c:/WINDOWS/clock.avi');
// "c:\\WINDOWS\\clock.avi"
uri2path('file://hostname/path/to/the%20file.txt');
// "\\\\hostname\\path\\to\\the file.txt"
uri2path('file:///c:/path/to/the%20file.txt');
// "c:\\path\\to\\the file.txt"
```
API
---
### fileUriToPath(String uri) → String
License
-------
(The MIT License)
Copyright (c) 2014 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,22 @@
import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types';
import { operate } from '../util/lift';
import { concatAll } from './concatAll';
import { popScheduler } from '../util/args';
import { from } from '../observable/from';
/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */
export function concat<T, A extends readonly unknown[]>(...sources: [...ObservableInputTuple<A>]): OperatorFunction<T, T | A[number]>;
/** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */
export function concat<T, A extends readonly unknown[]>(
...sourcesAndScheduler: [...ObservableInputTuple<A>, SchedulerLike]
): OperatorFunction<T, T | A[number]>;
/**
* @deprecated Replaced with {@link concatWith}. Will be removed in v8.
*/
export function concat<T, R>(...args: any[]): OperatorFunction<T, R> {
const scheduler = popScheduler(args);
return operate((source, subscriber) => {
concatAll()(from([source, ...args], scheduler)).subscribe(subscriber);
});
}

View File

@@ -0,0 +1,26 @@
export default blobFromSync;
/**
* @param {string} path filepath on the disk
* @param {string} [type] mimetype to use
*/
export function blobFromSync(path: string, type?: string): Blob;
import File from "./file.js";
import Blob from "./index.js";
/**
* @param {string} path filepath on the disk
* @param {string} [type] mimetype to use
* @returns {Promise<Blob>}
*/
export function blobFrom(path: string, type?: string): Promise<Blob>;
/**
* @param {string} path filepath on the disk
* @param {string} [type] mimetype to use
* @returns {Promise<File>}
*/
export function fileFrom(path: string, type?: string): Promise<File>;
/**
* @param {string} path filepath on the disk
* @param {string} [type] mimetype to use
*/
export function fileFromSync(path: string, type?: string): File;
export { File, Blob };

View File

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

View File

@@ -0,0 +1,36 @@
var baseIsMatch = require('./_baseIsMatch'),
getMatchData = require('./_getMatchData');
/**
* Performs a partial deep comparison between `object` and `source` to
* determine if `object` contains equivalent property values.
*
* **Note:** This method is equivalent to `_.matches` when `source` is
* partially applied.
*
* Partial comparisons will match empty array and empty object `source`
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
* @example
*
* var object = { 'a': 1, 'b': 2 };
*
* _.isMatch(object, { 'b': 2 });
* // => true
*
* _.isMatch(object, { 'b': 1 });
* // => false
*/
function isMatch(object, source) {
return object === source || baseIsMatch(object, source, getMatchData(source));
}
module.exports = isMatch;

View File

@@ -0,0 +1,24 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>Mousetrap Tests</title>
<link rel="stylesheet" href="../node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/sinon/pkg/sinon.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../mousetrap.js"></script>
<script src="libs/key-event.js"></script>
<script>mocha.setup('bdd')</script>
<script src="test.mousetrap.js"></script>
<script>
mocha.checkLeaks();
mocha.globals(['Mousetrap']);
mocha.run();
</script>
</body>

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.0277,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.00693,"79":0,"80":0,"81":0,"82":0.00346,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0.00693,"102":0.01039,"103":0.00346,"104":0.00346,"105":0,"106":0,"107":0.00693,"108":0.00346,"109":0.26319,"110":0.13506,"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.01732,"50":0,"51":0,"52":0,"53":0.00346,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.02424,"80":0.00346,"81":0.00346,"83":0.00346,"84":0.00346,"85":0,"86":0,"87":0.00346,"88":0,"89":0,"90":0,"91":0.00346,"92":0,"93":0.00346,"94":0,"95":0.00346,"96":0.00346,"97":0,"98":0.00346,"99":0,"100":0,"101":0,"102":0.00346,"103":0.05887,"104":0.00346,"105":0.01039,"106":0.00346,"107":0.04156,"108":0.22163,"109":3.92704,"110":1.9843,"111":0,"112":0,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0.00346,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0.01732,"94":0.17315,"95":0.07619,"9.5-9.6":0,"10.0-10.1":0,"10.5":0,"10.6":0,"11.1":0,"11.5":0,"11.6":0,"12.1":0},B:{"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0.00346,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0.00346,"106":0,"107":0.00693,"108":0.01732,"109":0.69606,"110":1.08046},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.0277,"15":0.00693,_:"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.02424,"13.1":0.0658,"14.1":0.16969,"15.1":0.0277,"15.2-15.3":0.12121,"15.4":0.11082,"15.5":0.10389,"15.6":0.61641,"16.0":0.03117,"16.1":0.30128,"16.2":0.65104,"16.3":0.31513,"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,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.0127,"10.0-10.2":0,"10.3":0.02964,"11.0-11.2":0,"11.3-11.4":0.00847,"12.0-12.1":0.01694,"12.2-12.5":0.40645,"13.0-13.1":0,"13.2":0.00847,"13.3":0.01694,"13.4-13.7":0.08891,"14.0-14.4":0.19053,"14.5-14.8":0.87642,"15.0-15.1":0.11432,"15.2-15.3":0.24133,"15.4":0.28791,"15.5":0.97803,"15.6":2.96797,"16.0":4.76737,"16.1":10.92347,"16.2":13.12086,"16.3":5.195,"16.4":0.03811},P:{"4":0.05171,"20":2.42015,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.18617,"8.2":0,"9.2":0,"10.1":0,"11.1-11.2":0.06206,"12.0":0.01034,"13.0":0.03103,"14.0":0.03103,"15.0":0.03103,"16.0":0.04137,"17.0":0.05171,"18.0":0.15514,"19.0":4.2301},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.13467},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.00693,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.08498},H:{"0":0.08045},L:{"0":37.30099},R:{_:"0"},M:{"0":0.28109},Q:{"13.1":0}};

View File

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

View File

@@ -0,0 +1,101 @@
"use strict";
exports.__esModule = true;
exports["default"] = void 0;
var _cssesc = _interopRequireDefault(require("cssesc"));
var _util = require("../util");
var _node = _interopRequireDefault(require("./node"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var Namespace = /*#__PURE__*/function (_Node) {
_inheritsLoose(Namespace, _Node);
function Namespace() {
return _Node.apply(this, arguments) || this;
}
var _proto = Namespace.prototype;
_proto.qualifiedName = function qualifiedName(value) {
if (this.namespace) {
return this.namespaceString + "|" + value;
} else {
return value;
}
};
_proto.valueToString = function valueToString() {
return this.qualifiedName(_Node.prototype.valueToString.call(this));
};
_createClass(Namespace, [{
key: "namespace",
get: function get() {
return this._namespace;
},
set: function set(namespace) {
if (namespace === true || namespace === "*" || namespace === "&") {
this._namespace = namespace;
if (this.raws) {
delete this.raws.namespace;
}
return;
}
var escaped = (0, _cssesc["default"])(namespace, {
isIdentifier: true
});
this._namespace = namespace;
if (escaped !== namespace) {
(0, _util.ensureObject)(this, "raws");
this.raws.namespace = escaped;
} else if (this.raws) {
delete this.raws.namespace;
}
}
}, {
key: "ns",
get: function get() {
return this._namespace;
},
set: function set(namespace) {
this.namespace = namespace;
}
}, {
key: "namespaceString",
get: function get() {
if (this.namespace) {
var ns = this.stringifyProperty("namespace");
if (ns === true) {
return '';
} else {
return ns;
}
} else {
return '';
}
}
}]);
return Namespace;
}(_node["default"]);
exports["default"] = Namespace;
;
module.exports = exports.default;

View File

@@ -0,0 +1,226 @@
"use strict";
module.exports = function (Promise, apiRejection, tryConvertToPromise,
createContext, INTERNAL, debug) {
var util = require("./util");
var TypeError = require("./errors").TypeError;
var inherits = require("./util").inherits;
var errorObj = util.errorObj;
var tryCatch = util.tryCatch;
var NULL = {};
function thrower(e) {
setTimeout(function(){throw e;}, 0);
}
function castPreservingDisposable(thenable) {
var maybePromise = tryConvertToPromise(thenable);
if (maybePromise !== thenable &&
typeof thenable._isDisposable === "function" &&
typeof thenable._getDisposer === "function" &&
thenable._isDisposable()) {
maybePromise._setDisposable(thenable._getDisposer());
}
return maybePromise;
}
function dispose(resources, inspection) {
var i = 0;
var len = resources.length;
var ret = new Promise(INTERNAL);
function iterator() {
if (i >= len) return ret._fulfill();
var maybePromise = castPreservingDisposable(resources[i++]);
if (maybePromise instanceof Promise &&
maybePromise._isDisposable()) {
try {
maybePromise = tryConvertToPromise(
maybePromise._getDisposer().tryDispose(inspection),
resources.promise);
} catch (e) {
return thrower(e);
}
if (maybePromise instanceof Promise) {
return maybePromise._then(iterator, thrower,
null, null, null);
}
}
iterator();
}
iterator();
return ret;
}
function Disposer(data, promise, context) {
this._data = data;
this._promise = promise;
this._context = context;
}
Disposer.prototype.data = function () {
return this._data;
};
Disposer.prototype.promise = function () {
return this._promise;
};
Disposer.prototype.resource = function () {
if (this.promise().isFulfilled()) {
return this.promise().value();
}
return NULL;
};
Disposer.prototype.tryDispose = function(inspection) {
var resource = this.resource();
var context = this._context;
if (context !== undefined) context._pushContext();
var ret = resource !== NULL
? this.doDispose(resource, inspection) : null;
if (context !== undefined) context._popContext();
this._promise._unsetDisposable();
this._data = null;
return ret;
};
Disposer.isDisposer = function (d) {
return (d != null &&
typeof d.resource === "function" &&
typeof d.tryDispose === "function");
};
function FunctionDisposer(fn, promise, context) {
this.constructor$(fn, promise, context);
}
inherits(FunctionDisposer, Disposer);
FunctionDisposer.prototype.doDispose = function (resource, inspection) {
var fn = this.data();
return fn.call(resource, resource, inspection);
};
function maybeUnwrapDisposer(value) {
if (Disposer.isDisposer(value)) {
this.resources[this.index]._setDisposable(value);
return value.promise();
}
return value;
}
function ResourceList(length) {
this.length = length;
this.promise = null;
this[length-1] = null;
}
ResourceList.prototype._resultCancelled = function() {
var len = this.length;
for (var i = 0; i < len; ++i) {
var item = this[i];
if (item instanceof Promise) {
item.cancel();
}
}
};
Promise.using = function () {
var len = arguments.length;
if (len < 2) return apiRejection(
"you must pass at least 2 arguments to Promise.using");
var fn = arguments[len - 1];
if (typeof fn !== "function") {
return apiRejection("expecting a function but got " + util.classString(fn));
}
var input;
var spreadArgs = true;
if (len === 2 && Array.isArray(arguments[0])) {
input = arguments[0];
len = input.length;
spreadArgs = false;
} else {
input = arguments;
len--;
}
var resources = new ResourceList(len);
for (var i = 0; i < len; ++i) {
var resource = input[i];
if (Disposer.isDisposer(resource)) {
var disposer = resource;
resource = resource.promise();
resource._setDisposable(disposer);
} else {
var maybePromise = tryConvertToPromise(resource);
if (maybePromise instanceof Promise) {
resource =
maybePromise._then(maybeUnwrapDisposer, null, null, {
resources: resources,
index: i
}, undefined);
}
}
resources[i] = resource;
}
var reflectedResources = new Array(resources.length);
for (var i = 0; i < reflectedResources.length; ++i) {
reflectedResources[i] = Promise.resolve(resources[i]).reflect();
}
var resultPromise = Promise.all(reflectedResources)
.then(function(inspections) {
for (var i = 0; i < inspections.length; ++i) {
var inspection = inspections[i];
if (inspection.isRejected()) {
errorObj.e = inspection.error();
return errorObj;
} else if (!inspection.isFulfilled()) {
resultPromise.cancel();
return;
}
inspections[i] = inspection.value();
}
promise._pushContext();
fn = tryCatch(fn);
var ret = spreadArgs
? fn.apply(undefined, inspections) : fn(inspections);
var promiseCreated = promise._popContext();
debug.checkForgottenReturns(
ret, promiseCreated, "Promise.using", promise);
return ret;
});
var promise = resultPromise.lastly(function() {
var inspection = new Promise.PromiseInspection(resultPromise);
return dispose(resources, inspection);
});
resources.promise = promise;
promise._setOnCancel(resources);
return promise;
};
Promise.prototype._setDisposable = function (disposer) {
this._bitField = this._bitField | 131072;
this._disposer = disposer;
};
Promise.prototype._isDisposable = function () {
return (this._bitField & 131072) > 0;
};
Promise.prototype._getDisposer = function () {
return this._disposer;
};
Promise.prototype._unsetDisposable = function () {
this._bitField = this._bitField & (~131072);
this._disposer = undefined;
};
Promise.prototype.disposer = function (fn) {
if (typeof fn === "function") {
return new FunctionDisposer(fn, this, createContext());
}
throw new TypeError();
};
};

View File

@@ -0,0 +1,9 @@
var test = require('tape');
var resolve = require('../');
test('nonstring', function (t) {
t.plan(1);
resolve(555, function (err, res, pkg) {
t.ok(err);
});
});

View File

@@ -0,0 +1,25 @@
var baseUniq = require('./_baseUniq');
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons, in which only the first occurrence of each element
* is kept. The order of result values is determined by the order they occur
* in the array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.uniq([2, 1, 2]);
* // => [2, 1]
*/
function uniq(array) {
return (array && array.length) ? baseUniq(array) : [];
}
module.exports = uniq;

View File

@@ -0,0 +1,47 @@
import type {Simplify} from './simplify';
// Returns `never` if the key is optional otherwise return the key type.
type RequiredFilter<Type, Key extends keyof Type> = undefined extends Type[Key]
? Type[Key] extends undefined
? Key
: never
: Key;
// Returns `never` if the key is required otherwise return the key type.
type OptionalFilter<Type, Key extends keyof Type> = undefined extends Type[Key]
? Type[Key] extends undefined
? never
: Key
: never;
/**
Enforce optional keys (by adding the `?` operator) for keys that have a union with `undefined`.
@example
```
import type {EnforceOptional} from 'type-fest';
type Foo = {
a: string;
b?: string;
c: undefined;
d: number | undefined;
};
type FooBar = EnforceOptional<Foo>;
// => {
// a: string;
// b?: string;
// c: undefined;
// d?: number;
// }
```
@internal
@category Object
*/
export type EnforceOptional<ObjectType> = Simplify<{
[Key in keyof ObjectType as RequiredFilter<ObjectType, Key>]: ObjectType[Key]
} & {
[Key in keyof ObjectType as OptionalFilter<ObjectType, Key>]?: Exclude<ObjectType[Key], undefined>
}>;

View File

@@ -0,0 +1,63 @@
import { ParseRuntime } from "./ParseRuntime";
import stripBom from "strip-bom";
/**
* For each data chunk coming to parser:
* 1. append the data to the buffer that is left from last chunk
* 2. check if utf8 chars being split, if does, stripe the bytes and add to left buffer.
* 3. stripBom
*/
export function prepareData(chunk: Buffer, runtime: ParseRuntime): string {
const workChunk = concatLeftChunk(chunk, runtime);
runtime.csvLineBuffer = undefined;
const cleanCSVString = cleanUtf8Split(workChunk, runtime).toString("utf8");
if (runtime.started === false) {
return stripBom(cleanCSVString);
} else {
return cleanCSVString;
}
}
/**
* append data to buffer that is left form last chunk
*/
function concatLeftChunk(chunk: Buffer, runtime: ParseRuntime): Buffer {
if (runtime.csvLineBuffer && runtime.csvLineBuffer.length > 0) {
return Buffer.concat([runtime.csvLineBuffer, chunk]);
} else {
return chunk;
}
}
/**
* check if utf8 chars being split, if does, stripe the bytes and add to left buffer.
*/
function cleanUtf8Split(chunk: Buffer, runtime: ParseRuntime): Buffer {
let idx = chunk.length - 1;
/**
* From Keyang:
* The code below is to check if a single utf8 char (which could be multiple bytes) being split.
* If the char being split, the buffer from two chunk needs to be concat
* check how utf8 being encoded to understand the code below.
* If anyone has any better way to do this, please let me know.
*/
if ((chunk[idx] & 1 << 7) != 0) {
while ((chunk[idx] & 3 << 6) === 128) {
idx--;
}
idx--;
}
if (idx != chunk.length - 1) {
runtime.csvLineBuffer = chunk.slice(idx + 1);
return chunk.slice(0, idx + 1)
// var _cb=cb;
// var self=this;
// cb=function(){
// if (self._csvLineBuffer){
// self._csvLineBuffer=Buffer.concat([bufFromString(self._csvLineBuffer,"utf8"),left]);
// }else{
// self._csvLineBuffer=left;
// }
// _cb();
// }
} else {
return chunk;
}
}

View File

@@ -0,0 +1,21 @@
import { envReplace } from './env-replace';
const ENV = {
foo: 'foo_value',
bar: 'bar_value',
}
test.each([
['-${foo}-${bar}', '-foo_value-bar_value'],
['\\${foo}', '${foo}'],
['\\${zoo}', '${zoo}'],
['\\\\${foo}', '\\foo_value'],
])('success %s => %s', (settingValue, expected) => {
const actual = envReplace(settingValue, ENV);
expect(actual).toEqual(expected);
})
test('fail when the env variable is not found', () => {
expect(() => envReplace('${baz}', ENV)).toThrow(`Failed to replace env in config: \${baz}`);
})

View File

@@ -0,0 +1,45 @@
import type {Except} from './except';
import type {ConditionalKeys} from './conditional-keys';
/**
Exclude keys from a shape that matches the given `Condition`.
This is useful when you want to create a new type with a specific set of keys from a shape. For example, you might want to exclude all the primitive properties from a class and form a new shape containing everything but the primitive properties.
@example
```
import type {Primitive, ConditionalExcept} from 'type-fest';
class Awesome {
name: string;
successes: number;
failures: bigint;
run() {}
}
type ExceptPrimitivesFromAwesome = ConditionalExcept<Awesome, Primitive>;
//=> {run: () => void}
```
@example
```
import type {ConditionalExcept} from 'type-fest';
interface Example {
a: string;
b: string | number;
c: () => void;
d: {};
}
type NonStringKeysOnly = ConditionalExcept<Example, string>;
//=> {b: string | number; c: () => void; d: {}}
```
@category Object
*/
export type ConditionalExcept<Base, Condition> = Except<
Base,
ConditionalKeys<Base, Condition>
>;

View File

@@ -0,0 +1,43 @@
'use strict';
exports.__esModule = true;
// istanbul ignore next
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _utils = require('../utils');
var _exception = require('../exception');
var _exception2 = _interopRequireDefault(_exception);
exports['default'] = function (instance) {
instance.registerHelper('with', function (context, options) {
if (arguments.length != 2) {
throw new _exception2['default']('#with requires exactly one argument');
}
if (_utils.isFunction(context)) {
context = context.call(this);
}
var fn = options.fn;
if (!_utils.isEmpty(context)) {
var data = options.data;
if (options.data && options.ids) {
data = _utils.createFrame(options.data);
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
}
return fn(context, {
data: data,
blockParams: _utils.blockParams([context], [data && data.contextPath])
});
} else {
return options.inverse(this);
}
});
};
module.exports = exports['default'];
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2xpYi9oYW5kbGViYXJzL2hlbHBlcnMvd2l0aC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7O3FCQU1PLFVBQVU7O3lCQUNLLGNBQWM7Ozs7cUJBRXJCLFVBQVMsUUFBUSxFQUFFO0FBQ2hDLFVBQVEsQ0FBQyxjQUFjLENBQUMsTUFBTSxFQUFFLFVBQVMsT0FBTyxFQUFFLE9BQU8sRUFBRTtBQUN6RCxRQUFJLFNBQVMsQ0FBQyxNQUFNLElBQUksQ0FBQyxFQUFFO0FBQ3pCLFlBQU0sMkJBQWMscUNBQXFDLENBQUMsQ0FBQztLQUM1RDtBQUNELFFBQUksa0JBQVcsT0FBTyxDQUFDLEVBQUU7QUFDdkIsYUFBTyxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDOUI7O0FBRUQsUUFBSSxFQUFFLEdBQUcsT0FBTyxDQUFDLEVBQUUsQ0FBQzs7QUFFcEIsUUFBSSxDQUFDLGVBQVEsT0FBTyxDQUFDLEVBQUU7QUFDckIsVUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztBQUN4QixVQUFJLE9BQU8sQ0FBQyxJQUFJLElBQUksT0FBTyxDQUFDLEdBQUcsRUFBRTtBQUMvQixZQUFJLEdBQUcsbUJBQVksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pDLFlBQUksQ0FBQyxXQUFXLEdBQUcseUJBQ2pCLE9BQU8sQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUN4QixPQUFPLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUNmLENBQUM7T0FDSDs7QUFFRCxhQUFPLEVBQUUsQ0FBQyxPQUFPLEVBQUU7QUFDakIsWUFBSSxFQUFFLElBQUk7QUFDVixtQkFBVyxFQUFFLG1CQUFZLENBQUMsT0FBTyxDQUFDLEVBQUUsQ0FBQyxJQUFJLElBQUksSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFDO09BQ2hFLENBQUMsQ0FBQztLQUNKLE1BQU07QUFDTCxhQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7S0FDOUI7R0FDRixDQUFDLENBQUM7Q0FDSiIsImZpbGUiOiJ3aXRoLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtcbiAgYXBwZW5kQ29udGV4dFBhdGgsXG4gIGJsb2NrUGFyYW1zLFxuICBjcmVhdGVGcmFtZSxcbiAgaXNFbXB0eSxcbiAgaXNGdW5jdGlvblxufSBmcm9tICcuLi91dGlscyc7XG5pbXBvcnQgRXhjZXB0aW9uIGZyb20gJy4uL2V4Y2VwdGlvbic7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uKGluc3RhbmNlKSB7XG4gIGluc3RhbmNlLnJlZ2lzdGVySGVscGVyKCd3aXRoJywgZnVuY3Rpb24oY29udGV4dCwgb3B0aW9ucykge1xuICAgIGlmIChhcmd1bWVudHMubGVuZ3RoICE9IDIpIHtcbiAgICAgIHRocm93IG5ldyBFeGNlcHRpb24oJyN3aXRoIHJlcXVpcmVzIGV4YWN0bHkgb25lIGFyZ3VtZW50Jyk7XG4gICAgfVxuICAgIGlmIChpc0Z1bmN0aW9uKGNvbnRleHQpKSB7XG4gICAgICBjb250ZXh0ID0gY29udGV4dC5jYWxsKHRoaXMpO1xuICAgIH1cblxuICAgIGxldCBmbiA9IG9wdGlvbnMuZm47XG5cbiAgICBpZiAoIWlzRW1wdHkoY29udGV4dCkpIHtcbiAgICAgIGxldCBkYXRhID0gb3B0aW9ucy5kYXRhO1xuICAgICAgaWYgKG9wdGlvbnMuZGF0YSAmJiBvcHRpb25zLmlkcykge1xuICAgICAgICBkYXRhID0gY3JlYXRlRnJhbWUob3B0aW9ucy5kYXRhKTtcbiAgICAgICAgZGF0YS5jb250ZXh0UGF0aCA9IGFwcGVuZENvbnRleHRQYXRoKFxuICAgICAgICAgIG9wdGlvbnMuZGF0YS5jb250ZXh0UGF0aCxcbiAgICAgICAgICBvcHRpb25zLmlkc1swXVxuICAgICAgICApO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gZm4oY29udGV4dCwge1xuICAgICAgICBkYXRhOiBkYXRhLFxuICAgICAgICBibG9ja1BhcmFtczogYmxvY2tQYXJhbXMoW2NvbnRleHRdLCBbZGF0YSAmJiBkYXRhLmNvbnRleHRQYXRoXSlcbiAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICByZXR1cm4gb3B0aW9ucy5pbnZlcnNlKHRoaXMpO1xuICAgIH1cbiAgfSk7XG59XG4iXX0=

View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,57 @@
import {Converter} from "../src/Converter";
import CSVError from "../src/CSVError";
var assert = require("assert");
var fs = require("fs");
describe("Converter error handling", function() {
it("should handle quote not closed", function(done) {
var rs = fs.createReadStream(__dirname + "/data/dataWithUnclosedQuotes");
var conv = new Converter({});
conv.on("error", function(err:CSVError) {
assert(err.err === "unclosed_quote");
done();
});
rs.pipe(conv);
});
it ("should handle column number mismatched error", function(done) {
var rs = fs.createReadStream(__dirname + "/data/dataWithMismatchedColumn");
var conv = new Converter({
checkColumn:true
});
var tested = false;
conv.on("error", function(err:CSVError) {
if (tested === false) {
assert(err.err === "column_mismatched");
tested = true;
// done();
}
});
conv.on('done',function() {
assert(tested);
done();
});
rs.pipe(conv);
});
it("should treat quote not closed as column_mismatched when alwaysSplitAtEOL is true", function(done) {
var rs = fs.createReadStream(__dirname + "/data/dataWithUnclosedQuotes");
var conv = new Converter({
checkColumn:true,
alwaysSplitAtEOL:true,
});
var tested = false;
conv.on("error", function(err:CSVError) {
if (tested === false) {
assert(err.err === "column_mismatched");
tested = true;
}
});
conv.on('done',function() {
assert(tested);
done();
});
rs.pipe(conv);
});
});

View File

@@ -0,0 +1,10 @@
import assertString from './util/assertString';
/* eslint-disable no-control-regex */
var multibyte = /[^\x00-\x7F]/;
/* eslint-enable no-control-regex */
export default function isMultibyte(str) {
assertString(str);
return multibyte.test(str);
}

View File

@@ -0,0 +1,198 @@
const {Parser: AcornParser, isNewLine: acornIsNewLine, getLineInfo: acornGetLineInfo} = require('acorn');
const {full: acornWalkFull} = require('acorn-walk');
const INTERNAL_STATE_NAME = 'VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL';
function assertType(node, type) {
if (!node) throw new Error(`None existent node expected '${type}'`);
if (node.type !== type) throw new Error(`Invalid node type '${node.type}' expected '${type}'`);
return node;
}
function makeNiceSyntaxError(message, code, filename, location, tokenizer) {
const loc = acornGetLineInfo(code, location);
let end = location;
while (end < code.length && !acornIsNewLine(code.charCodeAt(end))) {
end++;
}
let markerEnd = tokenizer.start === location ? tokenizer.end : location + 1;
if (!markerEnd || markerEnd > end) markerEnd = end;
let markerLen = markerEnd - location;
if (markerLen <= 0) markerLen = 1;
if (message === 'Unexpected token') {
const type = tokenizer.type;
if (type.label === 'name' || type.label === 'privateId') {
message = 'Unexpected identifier';
} else if (type.label === 'eof') {
message = 'Unexpected end of input';
} else if (type.label === 'num') {
message = 'Unexpected number';
} else if (type.label === 'string') {
message = 'Unexpected string';
} else if (type.label === 'regexp') {
message = 'Unexpected token \'/\'';
markerLen = 1;
} else {
const token = tokenizer.value || type.label;
message = `Unexpected token '${token}'`;
}
}
const error = new SyntaxError(message);
if (!filename) return error;
const line = code.slice(location - loc.column, end);
const marker = line.slice(0, loc.column).replace(/\S/g, ' ') + '^'.repeat(markerLen);
error.stack = `${filename}:${loc.line}\n${line}\n${marker}\n\n${error.stack}`;
return error;
}
function transformer(args, body, isAsync, isGenerator, filename) {
let code;
let argsOffset;
if (args === null) {
code = body;
// Note: Keywords are not allows to contain u escapes
if (!/\b(?:catch|import|async)\b/.test(code)) {
return {__proto__: null, code, hasAsync: false};
}
} else {
code = isAsync ? '(async function' : '(function';
if (isGenerator) code += '*';
code += ' anonymous(';
code += args;
argsOffset = code.length;
code += '\n) {\n';
code += body;
code += '\n})';
}
const parser = new AcornParser({
__proto__: null,
ecmaVersion: 2022,
allowAwaitOutsideFunction: args === null && isAsync,
allowReturnOutsideFunction: args === null
}, code);
let ast;
try {
ast = parser.parse();
} catch (e) {
// Try to generate a nicer error message.
if (e instanceof SyntaxError && e.pos !== undefined) {
let message = e.message;
const match = message.match(/^(.*) \(\d+:\d+\)$/);
if (match) message = match[1];
e = makeNiceSyntaxError(message, code, filename, e.pos, parser);
}
throw e;
}
if (args !== null) {
const pBody = assertType(ast, 'Program').body;
if (pBody.length !== 1) throw new SyntaxError('Single function literal required');
const expr = pBody[0];
if (expr.type !== 'ExpressionStatement') throw new SyntaxError('Single function literal required');
const func = expr.expression;
if (func.type !== 'FunctionExpression') throw new SyntaxError('Single function literal required');
if (func.body.start !== argsOffset + 3) throw new SyntaxError('Unexpected end of arg string');
}
const insertions = [];
let hasAsync = false;
const TO_LEFT = -100;
const TO_RIGHT = 100;
let internStateValiable = undefined;
let tmpname = 'VM2_INTERNAL_TMPNAME';
acornWalkFull(ast, (node, state, type) => {
if (type === 'Function') {
if (node.async) hasAsync = true;
}
const nodeType = node.type;
if (nodeType === 'CatchClause') {
const param = node.param;
if (param) {
if (param.type === 'ObjectPattern') {
insertions.push({
__proto__: null,
pos: node.start,
order: TO_RIGHT,
code: `catch($tmpname){try{throw ${INTERNAL_STATE_NAME}.handleException($tmpname);}`
});
insertions.push({
__proto__: null,
pos: node.body.end,
order: TO_LEFT,
code: `}`
});
} else {
const name = assertType(param, 'Identifier').name;
const cBody = assertType(node.body, 'BlockStatement');
if (cBody.body.length > 0) {
insertions.push({
__proto__: null,
pos: cBody.body[0].start,
order: TO_LEFT,
code: `${name}=${INTERNAL_STATE_NAME}.handleException(${name});`
});
}
}
}
} else if (nodeType === 'WithStatement') {
insertions.push({
__proto__: null,
pos: node.object.start,
order: TO_LEFT,
code: INTERNAL_STATE_NAME + '.wrapWith('
});
insertions.push({
__proto__: null,
pos: node.object.end,
order: TO_RIGHT,
code: ')'
});
} else if (nodeType === 'Identifier') {
if (node.name === INTERNAL_STATE_NAME) {
if (internStateValiable === undefined || internStateValiable.start > node.start) {
internStateValiable = node;
}
} else if (node.name.startsWith(tmpname)) {
tmpname = node.name + '_UNIQUE';
}
} else if (nodeType === 'ImportExpression') {
insertions.push({
__proto__: null,
pos: node.start,
order: TO_RIGHT,
code: INTERNAL_STATE_NAME + '.'
});
}
});
if (internStateValiable) {
throw makeNiceSyntaxError('Use of internal vm2 state variable', code, filename, internStateValiable.start, {
__proto__: null,
start: internStateValiable.start,
end: internStateValiable.end
});
}
if (insertions.length === 0) return {__proto__: null, code, hasAsync};
insertions.sort((a, b) => (a.pos == b.pos ? a.order - b.order : a.pos - b.pos));
let ncode = '';
let curr = 0;
for (let i = 0; i < insertions.length; i++) {
const change = insertions[i];
ncode += code.substring(curr, change.pos) + change.code.replace(/\$tmpname/g, tmpname);
curr = change.pos;
}
ncode += code.substring(curr);
return {__proto__: null, code: ncode, hasAsync};
}
exports.INTERNAL_STATE_NAME = INTERNAL_STATE_NAME;
exports.transformer = transformer;

View File

@@ -0,0 +1 @@
{"version":3,"file":"timeoutWith.js","sourceRoot":"","sources":["../../../../src/internal/operators/timeoutWith.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+EpC,MAAM,UAAU,WAAW,CACzB,GAAkB,EAClB,cAAkC,EAClC,SAAyB;IAEzB,IAAI,KAAgC,CAAC;IACrC,IAAI,IAAwB,CAAC;IAC7B,IAAI,KAA+B,CAAC;IACpC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,KAAK,CAAC;IAE/B,IAAI,WAAW,CAAC,GAAG,CAAC,EAAE;QACpB,KAAK,GAAG,GAAG,CAAC;KACb;SAAM,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAClC,IAAI,GAAG,GAAG,CAAC;KACZ;IAED,IAAI,cAAc,EAAE;QAClB,KAAK,GAAG,GAAG,EAAE,CAAC,cAAc,CAAC;KAC9B;SAAM;QACL,MAAM,IAAI,SAAS,CAAC,qCAAqC,CAAC,CAAC;KAC5D;IAED,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;QAEjC,MAAM,IAAI,SAAS,CAAC,sBAAsB,CAAC,CAAC;KAC7C;IAED,OAAO,OAAO,CAAwB;QACpC,KAAK;QACL,IAAI;QACJ,SAAS;QACT,IAAI,EAAE,KAAK;KACZ,CAAC,CAAC;AACL,CAAC"}

View File

@@ -0,0 +1,49 @@
{
"name": "statuses",
"description": "HTTP status utility",
"version": "2.0.1",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
],
"repository": "jshttp/statuses",
"license": "MIT",
"keywords": [
"http",
"status",
"code"
],
"files": [
"HISTORY.md",
"index.js",
"codes.json",
"LICENSE"
],
"devDependencies": {
"csv-parse": "4.14.2",
"eslint": "7.17.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-markdown": "1.0.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "4.2.1",
"eslint-plugin-standard": "4.1.0",
"mocha": "8.2.1",
"nyc": "15.1.0",
"raw-body": "2.4.1",
"stream-to-array": "2.3.0"
},
"engines": {
"node": ">= 0.8"
},
"scripts": {
"build": "node scripts/build.js",
"fetch": "node scripts/fetch-apache.js && node scripts/fetch-iana.js && node scripts/fetch-nginx.js && node scripts/fetch-node.js",
"lint": "eslint --plugin markdown --ext js,md .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"update": "npm run fetch && npm run build",
"version": "node scripts/version-history.js && git add HISTORY.md"
}
}

View File

@@ -0,0 +1,5 @@
{
"main": "./index",
"module": "./index.mjs",
"types": "./index.d.ts"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"switchMapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwDhD,MAAM,UAAU,WAAW,CACzB,eAAkB,EAClB,cAA6G;IAE7G,OAAO,UAAU,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,cAAM,OAAA,eAAe,EAAf,CAAe,CAAC,CAAC;AAC1H,CAAC"}

View File

@@ -0,0 +1,31 @@
import { async } from '../scheduler/async';
import { isValidDate } from '../util/isDate';
import { timeout } from './timeout';
export function timeoutWith(due, withObservable, scheduler) {
let first;
let each;
let _with;
scheduler = scheduler !== null && scheduler !== void 0 ? scheduler : async;
if (isValidDate(due)) {
first = due;
}
else if (typeof due === 'number') {
each = due;
}
if (withObservable) {
_with = () => withObservable;
}
else {
throw new TypeError('No observable provided to switch to');
}
if (first == null && each == null) {
throw new TypeError('No timeout provided.');
}
return timeout({
first,
each,
scheduler,
with: _with,
});
}
//# sourceMappingURL=timeoutWith.js.map

View File

@@ -0,0 +1,7 @@
root = true
[*]
indent_style = tab
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

View File

@@ -0,0 +1 @@
{"version":3,"file":"switchMapTo.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/switchMapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG9E,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAC9H,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAC5D,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,SAAS,GACxB,gBAAgB,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AACjD,0JAA0J;AAC1J,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,eAAe,CAAC,OAAO,CAAC,EAClE,UAAU,EAAE,CAAC,EACb,cAAc,EAAE,CAAC,UAAU,EAAE,CAAC,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC,GAC3G,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,8 @@
"use strict";
var isArrayLike = require("./is-array-like");
module.exports = function (obj) {
if (isArrayLike(obj)) return obj;
throw new TypeError(obj + " is not array-like value");
};

View File

@@ -0,0 +1,32 @@
var baseConformsTo = require('./_baseConformsTo'),
keys = require('./keys');
/**
* Checks if `object` conforms to `source` by invoking the predicate
* properties of `source` with the corresponding property values of `object`.
*
* **Note:** This method is equivalent to `_.conforms` when `source` is
* partially applied.
*
* @static
* @memberOf _
* @since 4.14.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property predicates to conform to.
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
* @example
*
* var object = { 'a': 1, 'b': 2 };
*
* _.conformsTo(object, { 'b': function(n) { return n > 1; } });
* // => true
*
* _.conformsTo(object, { 'b': function(n) { return n > 2; } });
* // => false
*/
function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
}
module.exports = conformsTo;

View File

@@ -0,0 +1,7 @@
// Exports true if environment provides native `Symbol` implementation
"use strict";
var Symbol = require("ext/global-this").Symbol;
module.exports = typeof Symbol === "function" && typeof Symbol() === "symbol";

View File

@@ -0,0 +1,16 @@
# node-is-arrayish [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-is-arrayish.svg?style=flat-square)](https://travis-ci.org/Qix-/node-is-arrayish) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-is-arrayish.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-is-arrayish)
> Determines if an object can be used like an Array
## Example
```javascript
var isArrayish = require('is-arrayish');
isArrayish([]); // true
isArrayish({__proto__: []}); // true
isArrayish({}); // false
isArrayish({length:10}); // false
```
## License
Licensed under the [MIT License](http://opensource.org/licenses/MIT).
You can find a copy of it in [LICENSE](LICENSE).

View File

@@ -0,0 +1,9 @@
"use strict";
module.exports = function (value) {
if (!value) return false;
if (typeof value === "symbol") return true;
if (!value.constructor) return false;
if (value.constructor.name !== "Symbol") return false;
return value[value.constructor.toStringTag] === "Symbol";
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"retryWhen.js","sourceRoot":"","sources":["../../../../src/internal/operators/retryWhen.ts"],"names":[],"mappings":";;;AACA,qDAAoD;AACpD,sCAAqC;AAIrC,qCAAuC;AACvC,2DAAgE;AA2DhE,SAAgB,SAAS,CAAI,QAA2D;IACtF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,QAA6B,CAAC;QAClC,IAAI,SAAS,GAAG,KAAK,CAAC;QACtB,IAAI,OAAqB,CAAC;QAE1B,IAAM,qBAAqB,GAAG;YAC5B,QAAQ,GAAG,MAAM,CAAC,SAAS,CACzB,6CAAwB,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAC,GAAG;gBAC7D,IAAI,CAAC,OAAO,EAAE;oBACZ,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;oBACxB,qBAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CACpC,6CAAwB,CAAC,UAAU,EAAE;wBAMnC,OAAA,QAAQ,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;oBAAvD,CAAuD,CACxD,CACF,CAAC;iBACH;gBACD,IAAI,OAAO,EAAE;oBAEX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC,CACH,CAAC;YAEF,IAAI,SAAS,EAAE;gBAKb,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACvB,QAAQ,GAAG,IAAI,CAAC;gBAEhB,SAAS,GAAG,KAAK,CAAC;gBAElB,qBAAqB,EAAE,CAAC;aACzB;QACH,CAAC,CAAC;QAGF,qBAAqB,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC;AA9CD,8BA8CC"}

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.03329,"46":0,"47":0,"48":0.01902,"49":0,"50":0,"51":0,"52":0.09986,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0.00476,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0.00951,"69":0,"70":0,"71":0,"72":0.00476,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0.06657,"79":0,"80":0.00476,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00476,"89":0.00476,"90":0,"91":0.06657,"92":0,"93":0,"94":0.03329,"95":0,"96":0,"97":0,"98":0.00951,"99":0,"100":0.00951,"101":0,"102":0.22349,"103":0.00951,"104":0.00476,"105":0.01902,"106":0.01427,"107":0.03329,"108":0.04755,"109":1.5216,"110":1.20302,"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.00476,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0.00476,"48":0,"49":0.00476,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0.00951,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0.00476,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00951,"80":0.00951,"81":0.06182,"83":0,"84":0.00951,"85":0,"86":0.00476,"87":0.00476,"88":0,"89":0.00476,"90":0,"91":0.00476,"92":0.00476,"93":0.01427,"94":0.01902,"95":0,"96":0.05231,"97":0.06182,"98":0.02853,"99":0.02378,"100":0.01427,"101":0.01427,"102":0.00476,"103":0.0428,"104":0.00476,"105":0.0428,"106":0.02853,"107":0.1902,"108":0.19496,"109":6.51435,"110":4.48397,"111":0,"112":0.00476,"113":0},F:{"9":0,"11":0,"12":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"60":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0.00476,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0.00476,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0.00951,"91":0,"92":0,"93":0.00951,"94":0.64193,"95":0.18069,"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.00476,"15":0,"16":0,"17":0.00476,"18":0.00951,"79":0,"80":0,"81":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0.00476,"90":0.00476,"91":0,"92":0.00476,"93":0.00476,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0.00476,"100":0.01427,"101":0.00476,"102":0,"103":0.01902,"104":0.00951,"105":0.1379,"106":0.01427,"107":0.01427,"108":0.05706,"109":0.81786,"110":1.47405},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.02378,"14":0.03329,"15":0.01427,_:"0","3.1":0,"3.2":0,"5.1":0,"6.1":0,"7.1":0,"9.1":0,"10.1":0.00476,"11.1":0,"12.1":0.02378,"13.1":0.07133,"14.1":0.16167,"15.1":0.01427,"15.2-15.3":0.01427,"15.4":0.06182,"15.5":0.07608,"15.6":0.46124,"16.0":0.09035,"16.1":0.25677,"16.2":0.46124,"16.3":0.41844,"16.4":0},G:{"8":0.00501,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.01003,"5.0-5.1":0,"6.0-6.1":0.01003,"7.0-7.1":0.01003,"8.1-8.4":0.00251,"9.0-9.2":0.00251,"9.3":0.07018,"10.0-10.2":0.00251,"10.3":0.1579,"11.0-11.2":0.11529,"11.3-11.4":0.43109,"12.0-12.1":0.00501,"12.2-12.5":0.60402,"13.0-13.1":0.01253,"13.2":0.00251,"13.3":0.18045,"13.4-13.7":0.08271,"14.0-14.4":0.22557,"14.5-14.8":1.10278,"15.0-15.1":0.29324,"15.2-15.3":0.21554,"15.4":0.52883,"15.5":0.6341,"15.6":1.85216,"16.0":1.79702,"16.1":6.10036,"16.2":6.58658,"16.3":2.40355,"16.4":0.01253},P:{"4":0.06352,"20":1.1962,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.57164,"8.2":0,"9.2":0.01059,"10.1":0,"11.1-11.2":0.06352,"12.0":0.03176,"13.0":0.27523,"14.0":0.06352,"15.0":0.06352,"16.0":0.21172,"17.0":0.04234,"18.0":0.12703,"19.0":3.65211},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.24986},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.02853,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.02623},H:{"0":0.04469},L:{"0":44.50865},R:{_:"0"},M:{"0":0.54548},Q:{"13.1":0.01574}};