new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"delay.js","sourceRoot":"","sources":["../../../../src/internal/operators/delay.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAEpD,yCAAwC;AACxC,6CAA4C;AA0D5C,SAAgB,KAAK,CAAI,GAAkB,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACpF,IAAM,QAAQ,GAAG,aAAK,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACvC,OAAO,qBAAS,CAAC,cAAM,OAAA,QAAQ,EAAR,CAAQ,CAAC,CAAC;AACnC,CAAC;AAHD,sBAGC"}
|
||||
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Tries to resolve the hostname. Returns true if succeeds.
|
||||
*
|
||||
* @param {String} host is the hostname from the URL.
|
||||
* @return {Boolean}
|
||||
*/
|
||||
export default function isResolvable(host: string): Promise<boolean>;
|
||||
@@ -0,0 +1,55 @@
|
||||
import type {WriteStream} from 'node:tty';
|
||||
|
||||
export type Options = {
|
||||
/**
|
||||
Whether `process.argv` should be sniffed for `--color` and `--no-color` flags.
|
||||
|
||||
@default true
|
||||
*/
|
||||
readonly sniffFlags?: boolean;
|
||||
};
|
||||
|
||||
/**
|
||||
Levels:
|
||||
- `0` - All colors disabled.
|
||||
- `1` - Basic 16 colors support.
|
||||
- `2` - ANSI 256 colors support.
|
||||
- `3` - Truecolor 16 million colors support.
|
||||
*/
|
||||
export type ColorSupportLevel = 0 | 1 | 2 | 3;
|
||||
|
||||
/**
|
||||
Detect whether the terminal supports color.
|
||||
*/
|
||||
export type ColorSupport = {
|
||||
/**
|
||||
The color level.
|
||||
*/
|
||||
level: ColorSupportLevel;
|
||||
|
||||
/**
|
||||
Whether basic 16 colors are supported.
|
||||
*/
|
||||
hasBasic: boolean;
|
||||
|
||||
/**
|
||||
Whether ANSI 256 colors are supported.
|
||||
*/
|
||||
has256: boolean;
|
||||
|
||||
/**
|
||||
Whether Truecolor 16 million colors are supported.
|
||||
*/
|
||||
has16m: boolean;
|
||||
};
|
||||
|
||||
export type ColorInfo = ColorSupport | false;
|
||||
|
||||
export function createSupportsColor(stream?: WriteStream, options?: Options): ColorInfo;
|
||||
|
||||
declare const supportsColor: {
|
||||
stdout: ColorInfo;
|
||||
stderr: ColorInfo;
|
||||
};
|
||||
|
||||
export default supportsColor;
|
||||
@@ -0,0 +1,43 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SetNumberFormatUnitOptions = void 0;
|
||||
var GetOption_1 = require("../GetOption");
|
||||
var IsWellFormedCurrencyCode_1 = require("../IsWellFormedCurrencyCode");
|
||||
var IsWellFormedUnitIdentifier_1 = require("../IsWellFormedUnitIdentifier");
|
||||
/**
|
||||
* https://tc39.es/ecma402/#sec-setnumberformatunitoptions
|
||||
*/
|
||||
function SetNumberFormatUnitOptions(nf, options, _a) {
|
||||
if (options === void 0) { options = Object.create(null); }
|
||||
var getInternalSlots = _a.getInternalSlots;
|
||||
var internalSlots = getInternalSlots(nf);
|
||||
var style = (0, GetOption_1.GetOption)(options, 'style', 'string', ['decimal', 'percent', 'currency', 'unit'], 'decimal');
|
||||
internalSlots.style = style;
|
||||
var currency = (0, GetOption_1.GetOption)(options, 'currency', 'string', undefined, undefined);
|
||||
if (currency !== undefined && !(0, IsWellFormedCurrencyCode_1.IsWellFormedCurrencyCode)(currency)) {
|
||||
throw RangeError('Malformed currency code');
|
||||
}
|
||||
if (style === 'currency' && currency === undefined) {
|
||||
throw TypeError('currency cannot be undefined');
|
||||
}
|
||||
var currencyDisplay = (0, GetOption_1.GetOption)(options, 'currencyDisplay', 'string', ['code', 'symbol', 'narrowSymbol', 'name'], 'symbol');
|
||||
var currencySign = (0, GetOption_1.GetOption)(options, 'currencySign', 'string', ['standard', 'accounting'], 'standard');
|
||||
var unit = (0, GetOption_1.GetOption)(options, 'unit', 'string', undefined, undefined);
|
||||
if (unit !== undefined && !(0, IsWellFormedUnitIdentifier_1.IsWellFormedUnitIdentifier)(unit)) {
|
||||
throw RangeError('Invalid unit argument for Intl.NumberFormat()');
|
||||
}
|
||||
if (style === 'unit' && unit === undefined) {
|
||||
throw TypeError('unit cannot be undefined');
|
||||
}
|
||||
var unitDisplay = (0, GetOption_1.GetOption)(options, 'unitDisplay', 'string', ['short', 'narrow', 'long'], 'short');
|
||||
if (style === 'currency') {
|
||||
internalSlots.currency = currency.toUpperCase();
|
||||
internalSlots.currencyDisplay = currencyDisplay;
|
||||
internalSlots.currencySign = currencySign;
|
||||
}
|
||||
if (style === 'unit') {
|
||||
internalSlots.unit = unit;
|
||||
internalSlots.unitDisplay = unitDisplay;
|
||||
}
|
||||
}
|
||||
exports.SetNumberFormatUnitOptions = SetNumberFormatUnitOptions;
|
||||
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
var getName = require('../');
|
||||
var test = require('tape');
|
||||
var runTests = require('./tests');
|
||||
|
||||
test('as a function', function (t) {
|
||||
t.test('non-functions', function (st) {
|
||||
st['throws'](function () { getName(); }, TypeError, 'undefined is not a function');
|
||||
st['throws'](function () { getName(null); }, TypeError, 'null is not a function');
|
||||
st['throws'](function () { getName(true); }, TypeError, 'true is not a function');
|
||||
st['throws'](function () { getName(false); }, TypeError, 'false is not a function');
|
||||
st['throws'](function () { getName('foo'); }, TypeError, '"foo" is not a function');
|
||||
st['throws'](function () { getName([]); }, TypeError, '[] is not a function');
|
||||
st['throws'](function () { getName({}); }, TypeError, '{} is not a function');
|
||||
st['throws'](function () { getName(/a/g); }, TypeError, '/a/g is not a function');
|
||||
st.end();
|
||||
});
|
||||
|
||||
runTests(getName, t);
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').findLimit;
|
||||
@@ -0,0 +1,184 @@
|
||||
# Release history
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
<details>
|
||||
<summary><strong>Guiding Principles</strong></summary>
|
||||
|
||||
- Changelogs are for humans, not machines.
|
||||
- There should be an entry for every single version.
|
||||
- The same types of changes should be grouped.
|
||||
- Versions and sections should be linkable.
|
||||
- The latest version comes first.
|
||||
- The release date of each versions is displayed.
|
||||
- Mention whether you follow Semantic Versioning.
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Types of changes</strong></summary>
|
||||
|
||||
Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
|
||||
|
||||
- `Added` for new features.
|
||||
- `Changed` for changes in existing functionality.
|
||||
- `Deprecated` for soon-to-be removed features.
|
||||
- `Removed` for now removed features.
|
||||
- `Fixed` for any bug fixes.
|
||||
- `Security` in case of vulnerabilities.
|
||||
|
||||
</details>
|
||||
|
||||
## [3.0.0] - 2018-04-08
|
||||
|
||||
v3.0 is a complete refactor, resulting in a faster, smaller codebase, with fewer deps, and a more accurate parser and compiler.
|
||||
|
||||
**Breaking Changes**
|
||||
|
||||
- The undocumented `.makeRe` method was removed
|
||||
|
||||
**Non-breaking changes**
|
||||
|
||||
- Caching was removed
|
||||
|
||||
## [2.3.2] - 2018-04-08
|
||||
|
||||
- start refactoring
|
||||
- cover sets
|
||||
- better range handling
|
||||
|
||||
## [2.3.1] - 2018-02-17
|
||||
|
||||
- Remove unnecessary escape in Regex. (#14)
|
||||
|
||||
## [2.3.0] - 2017-10-19
|
||||
|
||||
- minor code reorganization
|
||||
- optimize regex
|
||||
- expose `maxLength` option
|
||||
|
||||
## [2.2.1] - 2017-05-30
|
||||
|
||||
- don't condense when braces contain extglobs
|
||||
|
||||
## [2.2.0] - 2017-05-28
|
||||
|
||||
- ensure word boundaries are preserved
|
||||
- fixes edge case where extglob characters precede a brace pattern
|
||||
|
||||
## [2.1.1] - 2017-04-27
|
||||
|
||||
- use snapdragon-node
|
||||
- handle edge case
|
||||
- optimizations, lint
|
||||
|
||||
## [2.0.4] - 2017-04-11
|
||||
|
||||
- pass opts to compiler
|
||||
- minor optimization in create method
|
||||
- re-write parser handlers to remove negation regex
|
||||
|
||||
## [2.0.3] - 2016-12-10
|
||||
|
||||
- use split-string
|
||||
- clear queue at the end
|
||||
- adds sequences example
|
||||
- add unit tests
|
||||
|
||||
## [2.0.2] - 2016-10-21
|
||||
|
||||
- fix comma handling in nested extglobs
|
||||
|
||||
## [2.0.1] - 2016-10-20
|
||||
|
||||
- add comments
|
||||
- more tests, ensure quotes are stripped
|
||||
|
||||
## [2.0.0] - 2016-10-19
|
||||
|
||||
- don't expand braces inside character classes
|
||||
- add quantifier pattern
|
||||
|
||||
## [1.8.5] - 2016-05-21
|
||||
|
||||
- Refactor (#10)
|
||||
|
||||
## [1.8.4] - 2016-04-20
|
||||
|
||||
- fixes https://github.com/jonschlinkert/micromatch/issues/66
|
||||
|
||||
## [1.8.0] - 2015-03-18
|
||||
|
||||
- adds exponent examples, tests
|
||||
- fixes the first example in https://github.com/jonschlinkert/micromatch/issues/38
|
||||
|
||||
## [1.6.0] - 2015-01-30
|
||||
|
||||
- optimizations, `bash` mode:
|
||||
- improve path escaping
|
||||
|
||||
## [1.5.0] - 2015-01-28
|
||||
|
||||
- Merge pull request #5 from eush77/lib-files
|
||||
|
||||
## [1.4.0] - 2015-01-24
|
||||
|
||||
- add extglob tests
|
||||
- externalize exponent function
|
||||
- better whitespace handling
|
||||
|
||||
## [1.3.0] - 2015-01-24
|
||||
|
||||
- make regex patterns explicity
|
||||
|
||||
## [1.1.0] - 2015-01-11
|
||||
|
||||
- don't create a match group with `makeRe`
|
||||
|
||||
## [1.0.0] - 2014-12-23
|
||||
|
||||
- Merge commit '97b05f5544f8348736a8efaecf5c32bbe3e2ad6e'
|
||||
- support empty brace syntax
|
||||
- better bash coverage
|
||||
- better support for regex strings
|
||||
|
||||
## [0.1.4] - 2014-11-14
|
||||
|
||||
- improve recognition of bad args, recognize mismatched argument types
|
||||
- support escaping
|
||||
- remove pathname-expansion
|
||||
- support whitespace in patterns
|
||||
|
||||
## [0.1.0]
|
||||
|
||||
- first commit
|
||||
|
||||
[2.3.2]: https://github.com/micromatch/braces/compare/2.3.1...2.3.2
|
||||
[2.3.1]: https://github.com/micromatch/braces/compare/2.3.0...2.3.1
|
||||
[2.3.0]: https://github.com/micromatch/braces/compare/2.2.1...2.3.0
|
||||
[2.2.1]: https://github.com/micromatch/braces/compare/2.2.0...2.2.1
|
||||
[2.2.0]: https://github.com/micromatch/braces/compare/2.1.1...2.2.0
|
||||
[2.1.1]: https://github.com/micromatch/braces/compare/2.1.0...2.1.1
|
||||
[2.1.0]: https://github.com/micromatch/braces/compare/2.0.4...2.1.0
|
||||
[2.0.4]: https://github.com/micromatch/braces/compare/2.0.3...2.0.4
|
||||
[2.0.3]: https://github.com/micromatch/braces/compare/2.0.2...2.0.3
|
||||
[2.0.2]: https://github.com/micromatch/braces/compare/2.0.1...2.0.2
|
||||
[2.0.1]: https://github.com/micromatch/braces/compare/2.0.0...2.0.1
|
||||
[2.0.0]: https://github.com/micromatch/braces/compare/1.8.5...2.0.0
|
||||
[1.8.5]: https://github.com/micromatch/braces/compare/1.8.4...1.8.5
|
||||
[1.8.4]: https://github.com/micromatch/braces/compare/1.8.0...1.8.4
|
||||
[1.8.0]: https://github.com/micromatch/braces/compare/1.6.0...1.8.0
|
||||
[1.6.0]: https://github.com/micromatch/braces/compare/1.5.0...1.6.0
|
||||
[1.5.0]: https://github.com/micromatch/braces/compare/1.4.0...1.5.0
|
||||
[1.4.0]: https://github.com/micromatch/braces/compare/1.3.0...1.4.0
|
||||
[1.3.0]: https://github.com/micromatch/braces/compare/1.2.0...1.3.0
|
||||
[1.2.0]: https://github.com/micromatch/braces/compare/1.1.0...1.2.0
|
||||
[1.1.0]: https://github.com/micromatch/braces/compare/1.0.0...1.1.0
|
||||
[1.0.0]: https://github.com/micromatch/braces/compare/0.1.4...1.0.0
|
||||
[0.1.4]: https://github.com/micromatch/braces/compare/0.1.0...0.1.4
|
||||
|
||||
[Unreleased]: https://github.com/micromatch/braces/compare/0.1.0...HEAD
|
||||
[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"fast-levenshtein","version":"2.0.6","files":{"package.json":{"checkedAt":1678883672142,"integrity":"sha512-RHSCxnUTXnajzc1qO+JvM3bcyUVHT0ShQDEZlfBllc2ruIRT2NbL99APT6BzwJ1s0OBopPjIV6TH5Vr7VbWwKQ==","mode":420,"size":998},"README.md":{"checkedAt":1678883672142,"integrity":"sha512-SCx0Uac0lA4WsYQKX46+IwJ0U3yIbASd9x+R75SRfC9jvir2GPRMfKe0Jt/dQ5QddADp3VFv2WcvWKsW5PgmDg==","mode":420,"size":3414},"levenshtein.js":{"checkedAt":1678883672142,"integrity":"sha512-4ekYJb58yg/Za2nmgK804dqnJ1zwHgtMyw3i1fDoz1Oowo1Vz+c4TY5lvNHFmI4rWDu/CD+T/hpBUAnuUol8YQ==","mode":420,"size":3932},"LICENSE.md":{"checkedAt":1678883672142,"integrity":"sha512-C6Nogtp0CvDA7Olfl9i5wmvNcVhYyNMH+B5dyp0v9T86bbdesFw9hUzDze+syDMYk5DCn9uC36UM5h6FLLD32g==","mode":420,"size":1100}}}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar`.
|
||||
|
||||
[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters.
|
||||
|
||||
@param path - A Windows backslash path.
|
||||
@returns A path with forward slashes.
|
||||
|
||||
@example
|
||||
```
|
||||
import path from 'path';
|
||||
import slash from 'slash';
|
||||
|
||||
const string = path.join('foo', 'bar');
|
||||
// Unix => foo/bar
|
||||
// Windows => foo\\bar
|
||||
|
||||
slash(string);
|
||||
// Unix => foo/bar
|
||||
// Windows => foo/bar
|
||||
```
|
||||
*/
|
||||
export default function slash(path: string): string;
|
||||
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('meanBy', require('../meanBy'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
var getPrototypeOf = Object.getPrototypeOf
|
||||
, prototype = Object.prototype
|
||||
, objToString = prototype.toString
|
||||
, id = Object().toString();
|
||||
|
||||
module.exports = function (value) {
|
||||
var proto, valueConstructor;
|
||||
if (!value || typeof value !== "object" || objToString.call(value) !== id) {
|
||||
return false;
|
||||
}
|
||||
proto = getPrototypeOf(value);
|
||||
if (proto === null) {
|
||||
valueConstructor = value.constructor;
|
||||
if (typeof valueConstructor !== "function") return true;
|
||||
return valueConstructor.prototype !== value;
|
||||
}
|
||||
return proto === prototype || getPrototypeOf(proto) === null;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0.00365,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0.01095,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0,"104":0,"105":0,"106":0,"107":0.01095,"108":0.00365,"109":0.1934,"110":0.10217,"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.0073,"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.00365,"64":0,"65":0,"66":0.00365,"67":0,"68":0,"69":0.0073,"70":0,"71":0,"72":0,"73":0.00365,"74":0.00365,"75":0.0073,"76":0.02189,"77":0.00365,"78":0,"79":0.04014,"80":0,"81":0.01825,"83":0.0073,"84":0.00365,"85":0,"86":0.00365,"87":0.0146,"88":0.00365,"89":0,"90":0,"91":0.01095,"92":0.0073,"93":0.10947,"94":0.00365,"95":0,"96":0.01095,"97":0.00365,"98":0.00365,"99":0.00365,"100":0.0073,"101":0.00365,"102":0.01095,"103":0.21529,"104":0.01095,"105":0.06568,"106":0.0146,"107":0.04379,"108":0.25543,"109":4.0066,"110":2.44118,"111":0.00365,"112":0.00365,"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.0073,"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.02919,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0.00365,"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.00365,"94":0.10947,"95":0.09487,"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.00365,"14":0,"15":0.00365,"16":0.00365,"17":0,"18":0.01095,"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.00365,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0.00365,"102":0.00365,"103":0,"104":0,"105":0.0073,"106":0.02189,"107":0.02919,"108":0.02919,"109":1.00712,"110":1.32094},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0.00365,"14":0.0073,"15":0,_:"0","3.1":0,"3.2":0,"5.1":0.0073,"6.1":0,"7.1":0,"9.1":0,"10.1":0,"11.1":0,"12.1":0,"13.1":0.05838,"14.1":0.02919,"15.1":0.00365,"15.2-15.3":0,"15.4":0.0073,"15.5":0.06933,"15.6":0.12042,"16.0":0.01095,"16.1":0.04014,"16.2":0.14596,"16.3":0.21894,"16.4":0},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.03942,"6.0-6.1":0.04397,"7.0-7.1":0.23653,"8.1-8.4":0,"9.0-9.2":0.00152,"9.3":0.11978,"10.0-10.2":0,"10.3":0.03032,"11.0-11.2":0.01213,"11.3-11.4":0.00455,"12.0-12.1":0.00606,"12.2-12.5":0.32447,"13.0-13.1":0,"13.2":0,"13.3":0.01668,"13.4-13.7":0.06975,"14.0-14.4":0.08794,"14.5-14.8":0.28656,"15.0-15.1":0.08642,"15.2-15.3":0.13191,"15.4":0.10613,"15.5":0.24108,"15.6":1.1599,"16.0":1.216,"16.1":2.46688,"16.2":3.78144,"16.3":2.04234,"16.4":0.01365},P:{"4":0.35914,"20":1.54219,"5.0-5.4":0.02113,"6.2-6.4":0,"7.2-7.4":0.3697,"8.2":0,"9.2":0.02113,"10.1":0,"11.1-11.2":0.09507,"12.0":0.01056,"13.0":0.03169,"14.0":0.02113,"15.0":0.15844,"16.0":0.13732,"17.0":0.38027,"18.0":0.12676,"19.0":2.80974},I:{"0":0,"3":0,"4":0.13989,"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":1.06319},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0.00365,"11":0.0073,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0},O:{"0":0.37471},H:{"0":0.33671},L:{"0":65.53124},R:{_:"0"},M:{"0":0.10797},Q:{"13.1":0.01905}};
|
||||
@@ -0,0 +1,23 @@
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { operate } from '../util/lift';
|
||||
import { noop } from '../util/noop';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
export function sample(notifier) {
|
||||
return operate((source, subscriber) => {
|
||||
let hasValue = false;
|
||||
let lastValue = null;
|
||||
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
||||
hasValue = true;
|
||||
lastValue = value;
|
||||
}));
|
||||
innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => {
|
||||
if (hasValue) {
|
||||
hasValue = false;
|
||||
const value = lastValue;
|
||||
lastValue = null;
|
||||
subscriber.next(value);
|
||||
}
|
||||
}, noop));
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=sample.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","16":"C"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"DC tB I v J D E F A B C K L G M N O w g x y EC FC"},D:{"1":"0 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 S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v J D E F A B C K L G M N O w g x y z"},E:{"1":"D E F A B C K L G JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v HC zB IC","16":"J"},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","2":"F B C PC QC RC SC qB 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","2":"zB UC BC VC WC"},H:{"2":"oC"},I:{"1":"f tC uC","2":"tB I pC qC rC sC BC"},J:{"1":"A","2":"D"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:1,C:"ChildNode.remove()"};
|
||||
@@ -0,0 +1,39 @@
|
||||
let flexSpec = require('./flex-spec')
|
||||
let Declaration = require('../declaration')
|
||||
|
||||
class FlexBasis extends Declaration {
|
||||
/**
|
||||
* Return property name by final spec
|
||||
*/
|
||||
normalize() {
|
||||
return 'flex-basis'
|
||||
}
|
||||
|
||||
/**
|
||||
* Return flex property for 2012 spec
|
||||
*/
|
||||
prefixed(prop, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012) {
|
||||
return prefix + 'flex-preferred-size'
|
||||
}
|
||||
return super.prefixed(prop, prefix)
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignore 2009 spec and use flex property for 2012
|
||||
*/
|
||||
set(decl, prefix) {
|
||||
let spec
|
||||
;[spec, prefix] = flexSpec(prefix)
|
||||
if (spec === 2012 || spec === 'final') {
|
||||
return super.set(decl, prefix)
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
FlexBasis.names = ['flex-basis', 'flex-preferred-size']
|
||||
|
||||
module.exports = FlexBasis
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[1149] = (function(){ var d = "\u0000\u0001\u0002\u0003\t\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013
\b\u0018\u0019\u001c\u001d\u001e\u001f\n\u0017\u001b\u0005\u0006\u0007\u0016\u0004\u0014\u0015\u001a âäàáãåçñÞ.<(+!&éêëèíîïì߯$*);Ö-/ÂÄÀÁÃÅÇѦ,%_>?øÉÊËÈÍÎÏÌð:#Ð'=\"Øabcdefghi«»`ý{±°jklmnopqrªº}¸]€µöstuvwxyz¡¿@Ý[®¢£¥·©§¶¼½¾¬|¯¨\\×þABCDEFGHIô~òóõæJKLMNOPQR¹ûüùúÿ´÷STUVWXYZ²Ô^ÒÓÕ0123456789³ÛÜÙÚ", D = [], e = {}; for(var i=0;i!=d.length;++i) { if(d.charCodeAt(i) !== 0xFFFD) e[d.charAt(i)] = i; D[i] = d.charAt(i); } return {"enc": e, "dec": D }; })();
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"TestMessage.d.ts","sourceRoot":"","sources":["../../../../src/internal/testing/TestMessage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
||||
@@ -0,0 +1,136 @@
|
||||
const ANY = Symbol('SemVer ANY')
|
||||
// hoisted class for cyclic dependency
|
||||
class Comparator {
|
||||
static get ANY () {
|
||||
return ANY
|
||||
}
|
||||
|
||||
constructor (comp, options) {
|
||||
options = parseOptions(options)
|
||||
|
||||
if (comp instanceof Comparator) {
|
||||
if (comp.loose === !!options.loose) {
|
||||
return comp
|
||||
} else {
|
||||
comp = comp.value
|
||||
}
|
||||
}
|
||||
|
||||
debug('comparator', comp, options)
|
||||
this.options = options
|
||||
this.loose = !!options.loose
|
||||
this.parse(comp)
|
||||
|
||||
if (this.semver === ANY) {
|
||||
this.value = ''
|
||||
} else {
|
||||
this.value = this.operator + this.semver.version
|
||||
}
|
||||
|
||||
debug('comp', this)
|
||||
}
|
||||
|
||||
parse (comp) {
|
||||
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
|
||||
const m = comp.match(r)
|
||||
|
||||
if (!m) {
|
||||
throw new TypeError(`Invalid comparator: ${comp}`)
|
||||
}
|
||||
|
||||
this.operator = m[1] !== undefined ? m[1] : ''
|
||||
if (this.operator === '=') {
|
||||
this.operator = ''
|
||||
}
|
||||
|
||||
// if it literally is just '>' or '' then allow anything.
|
||||
if (!m[2]) {
|
||||
this.semver = ANY
|
||||
} else {
|
||||
this.semver = new SemVer(m[2], this.options.loose)
|
||||
}
|
||||
}
|
||||
|
||||
toString () {
|
||||
return this.value
|
||||
}
|
||||
|
||||
test (version) {
|
||||
debug('Comparator.test', version, this.options.loose)
|
||||
|
||||
if (this.semver === ANY || version === ANY) {
|
||||
return true
|
||||
}
|
||||
|
||||
if (typeof version === 'string') {
|
||||
try {
|
||||
version = new SemVer(version, this.options)
|
||||
} catch (er) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return cmp(version, this.operator, this.semver, this.options)
|
||||
}
|
||||
|
||||
intersects (comp, options) {
|
||||
if (!(comp instanceof Comparator)) {
|
||||
throw new TypeError('a Comparator is required')
|
||||
}
|
||||
|
||||
if (!options || typeof options !== 'object') {
|
||||
options = {
|
||||
loose: !!options,
|
||||
includePrerelease: false,
|
||||
}
|
||||
}
|
||||
|
||||
if (this.operator === '') {
|
||||
if (this.value === '') {
|
||||
return true
|
||||
}
|
||||
return new Range(comp.value, options).test(this.value)
|
||||
} else if (comp.operator === '') {
|
||||
if (comp.value === '') {
|
||||
return true
|
||||
}
|
||||
return new Range(this.value, options).test(comp.semver)
|
||||
}
|
||||
|
||||
const sameDirectionIncreasing =
|
||||
(this.operator === '>=' || this.operator === '>') &&
|
||||
(comp.operator === '>=' || comp.operator === '>')
|
||||
const sameDirectionDecreasing =
|
||||
(this.operator === '<=' || this.operator === '<') &&
|
||||
(comp.operator === '<=' || comp.operator === '<')
|
||||
const sameSemVer = this.semver.version === comp.semver.version
|
||||
const differentDirectionsInclusive =
|
||||
(this.operator === '>=' || this.operator === '<=') &&
|
||||
(comp.operator === '>=' || comp.operator === '<=')
|
||||
const oppositeDirectionsLessThan =
|
||||
cmp(this.semver, '<', comp.semver, options) &&
|
||||
(this.operator === '>=' || this.operator === '>') &&
|
||||
(comp.operator === '<=' || comp.operator === '<')
|
||||
const oppositeDirectionsGreaterThan =
|
||||
cmp(this.semver, '>', comp.semver, options) &&
|
||||
(this.operator === '<=' || this.operator === '<') &&
|
||||
(comp.operator === '>=' || comp.operator === '>')
|
||||
|
||||
return (
|
||||
sameDirectionIncreasing ||
|
||||
sameDirectionDecreasing ||
|
||||
(sameSemVer && differentDirectionsInclusive) ||
|
||||
oppositeDirectionsLessThan ||
|
||||
oppositeDirectionsGreaterThan
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Comparator
|
||||
|
||||
const parseOptions = require('../internal/parse-options')
|
||||
const { re, t } = require('../internal/re')
|
||||
const cmp = require('../functions/cmp')
|
||||
const debug = require('../internal/debug')
|
||||
const SemVer = require('./semver')
|
||||
const Range = require('./range')
|
||||
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-tostring
|
||||
*/
|
||||
export declare function ToString(o: unknown): string;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-tonumber
|
||||
* @param val
|
||||
*/
|
||||
export declare function ToNumber(val: any): number;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-timeclip
|
||||
* @param time
|
||||
*/
|
||||
export declare function TimeClip(time: number): number;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-toobject
|
||||
* @param arg
|
||||
*/
|
||||
export declare function ToObject<T>(arg: T): T extends null ? never : T extends undefined ? never : T;
|
||||
/**
|
||||
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
|
||||
* @param x
|
||||
* @param y
|
||||
*/
|
||||
export declare function SameValue(x: any, y: any): boolean;
|
||||
/**
|
||||
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate
|
||||
* @param len
|
||||
*/
|
||||
export declare function ArrayCreate(len: number): any[];
|
||||
/**
|
||||
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty
|
||||
* @param o
|
||||
* @param prop
|
||||
*/
|
||||
export declare function HasOwnProperty(o: object, prop: string): boolean;
|
||||
/**
|
||||
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
|
||||
* @param x
|
||||
*/
|
||||
export declare function Type(x: any): "Null" | "Undefined" | "Object" | "Number" | "Boolean" | "String" | "Symbol" | "BigInt" | undefined;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#eqn-Day
|
||||
* @param t
|
||||
*/
|
||||
export declare function Day(t: number): number;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-week-day
|
||||
* @param t
|
||||
*/
|
||||
export declare function WeekDay(t: number): number;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-year-number
|
||||
* @param y
|
||||
*/
|
||||
export declare function DayFromYear(y: number): number;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-year-number
|
||||
* @param y
|
||||
*/
|
||||
export declare function TimeFromYear(y: number): number;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-year-number
|
||||
* @param t
|
||||
*/
|
||||
export declare function YearFromTime(t: number): number;
|
||||
export declare function DaysInYear(y: number): 365 | 366;
|
||||
export declare function DayWithinYear(t: number): number;
|
||||
export declare function InLeapYear(t: number): 0 | 1;
|
||||
/**
|
||||
* https://tc39.es/ecma262/#sec-month-number
|
||||
* @param t
|
||||
*/
|
||||
export declare function MonthFromTime(t: number): 0 | 1 | 2 | 3 | 4 | 7 | 5 | 6 | 8 | 9 | 10 | 11;
|
||||
export declare function DateFromTime(t: number): number;
|
||||
export declare function HourFromTime(t: number): number;
|
||||
export declare function MinFromTime(t: number): number;
|
||||
export declare function SecFromTime(t: number): number;
|
||||
/**
|
||||
* The abstract operation OrdinaryHasInstance implements
|
||||
* the default algorithm for determining if an object O
|
||||
* inherits from the instance object inheritance path
|
||||
* provided by constructor C.
|
||||
* @param C class
|
||||
* @param O object
|
||||
* @param internalSlots internalSlots
|
||||
*/
|
||||
export declare function OrdinaryHasInstance(C: Object, O: any, internalSlots?: {
|
||||
boundTargetFunction: any;
|
||||
}): boolean;
|
||||
export declare function msFromTime(t: number): number;
|
||||
//# sourceMappingURL=262.d.ts.map
|
||||
@@ -0,0 +1,36 @@
|
||||
# DOMException
|
||||
An implementation of the DOMException class from NodeJS
|
||||
|
||||
This package implements the [`DOMException`](https://developer.mozilla.org/en-US/docs/Web/API/DOMException) class that comes from NodeJS itself. (including the legacy codes)
|
||||
NodeJS has DOMException built in, but it's not globally available, and you can't require/import it from somewhere.
|
||||
|
||||
The only possible way is to use some web-ish tools that have been introduced into NodeJS that throws an error and catch the constructor.
|
||||
This way you will have the same class that NodeJS has and you can check if the error is a instance of DOMException.
|
||||
The instanceof check would not have worked with a custom class such as the DOMException provided by domenic which also is much larger in size.
|
||||
|
||||
```js
|
||||
import DOMException from 'node-domexception'
|
||||
import { MessageChannel } from 'worker_threads'
|
||||
|
||||
async function hello() {
|
||||
const port = new MessageChannel().port1
|
||||
const ab = new ArrayBuffer()
|
||||
port.postMessage(ab, [ab, ab])
|
||||
}
|
||||
|
||||
hello().catch(err => {
|
||||
console.assert(err.name === 'DataCloneError')
|
||||
console.assert(err.code === 25)
|
||||
console.assert(err instanceof DOMException)
|
||||
})
|
||||
|
||||
const e1 = new DOMException('Something went wrong', 'BadThingsError')
|
||||
console.assert(e1.name === 'BadThingsError')
|
||||
console.assert(e1.code === 0)
|
||||
|
||||
const e2 = new DOMException('Another exciting error message', 'NoModificationAllowedError')
|
||||
console.assert(e2.name === 'NoModificationAllowedError')
|
||||
console.assert(e2.code === 7)
|
||||
|
||||
console.assert(DOMException.INUSE_ATTRIBUTE_ERR === 10)
|
||||
```
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L G M N O","194":"P Q R S T U V"},C:{"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 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":"W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB","194":"cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V"},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":"lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB PC QC RC SC qB AC TC rB","194":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h"},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:{"1":"f","2":"tB I pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"1":"h","2":"A B C qB AC rB"},L:{"1":"H"},M:{"2":"H"},N:{"2":"A B"},O:{"2":"vC"},P:{"1":"g 4C 5C sB 6C 7C 8C","2":"I wC xC yC zC 0C 0B 1C 2C 3C"},Q:{"2":"1B"},R:{"1":"9C"},S:{"2":"AD BD"}},B:7,C:"Cookie Store API"};
|
||||
@@ -0,0 +1,105 @@
|
||||
import {Agent as HttpAgent} from 'node:http';
|
||||
import {Agent as HttpsAgent} from 'node:https';
|
||||
import got from 'got';
|
||||
import registryUrl from 'registry-url';
|
||||
import registryAuthToken from 'registry-auth-token';
|
||||
import semver from 'semver';
|
||||
|
||||
// These agent options are chosen to match the npm client defaults and help with performance
|
||||
// See: `npm config get maxsockets` and #50
|
||||
const agentOptions = {
|
||||
keepAlive: true,
|
||||
maxSockets: 50,
|
||||
};
|
||||
|
||||
const httpAgent = new HttpAgent(agentOptions);
|
||||
const httpsAgent = new HttpsAgent(agentOptions);
|
||||
|
||||
export class PackageNotFoundError extends Error {
|
||||
constructor(packageName) {
|
||||
super(`Package \`${packageName}\` could not be found`);
|
||||
this.name = 'PackageNotFoundError';
|
||||
}
|
||||
}
|
||||
|
||||
export class VersionNotFoundError extends Error {
|
||||
constructor(packageName, version) {
|
||||
super(`Version \`${version}\` for package \`${packageName}\` could not be found`);
|
||||
this.name = 'VersionNotFoundError';
|
||||
}
|
||||
}
|
||||
|
||||
export default async function packageJson(packageName, options) {
|
||||
options = {
|
||||
version: 'latest',
|
||||
...options,
|
||||
};
|
||||
|
||||
const scope = packageName.split('/')[0];
|
||||
const registryUrl_ = options.registryUrl || registryUrl(scope);
|
||||
const packageUrl = new URL(encodeURIComponent(packageName).replace(/^%40/, '@'), registryUrl_);
|
||||
const authInfo = registryAuthToken(registryUrl_.toString(), {recursive: true});
|
||||
|
||||
const headers = {
|
||||
accept: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
|
||||
};
|
||||
|
||||
if (options.fullMetadata) {
|
||||
delete headers.accept;
|
||||
}
|
||||
|
||||
if (authInfo) {
|
||||
headers.authorization = `${authInfo.type} ${authInfo.token}`;
|
||||
}
|
||||
|
||||
const gotOptions = {
|
||||
headers,
|
||||
agent: {
|
||||
http: httpAgent,
|
||||
https: httpsAgent,
|
||||
},
|
||||
};
|
||||
|
||||
if (options.agent) {
|
||||
gotOptions.agent = options.agent;
|
||||
}
|
||||
|
||||
let data;
|
||||
try {
|
||||
data = await got(packageUrl, gotOptions).json();
|
||||
} catch (error) {
|
||||
if (error.response.statusCode === 404) {
|
||||
throw new PackageNotFoundError(packageName);
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
if (options.allVersions) {
|
||||
return data;
|
||||
}
|
||||
|
||||
let {version} = options;
|
||||
const versionError = new VersionNotFoundError(packageName, version);
|
||||
|
||||
if (data['dist-tags'][version]) {
|
||||
data = data.versions[data['dist-tags'][version]];
|
||||
} else if (version) {
|
||||
if (!data.versions[version]) {
|
||||
const versions = Object.keys(data.versions);
|
||||
version = semver.maxSatisfying(versions, version);
|
||||
|
||||
if (!version) {
|
||||
throw versionError;
|
||||
}
|
||||
}
|
||||
|
||||
data = data.versions[version];
|
||||
|
||||
if (!data) {
|
||||
throw versionError;
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var internal = require('./internal/index.js');
|
||||
|
||||
|
||||
|
||||
Object.defineProperty(exports, 'SvelteComponent', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.SvelteComponentDev;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'SvelteComponentTyped', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.SvelteComponentTyped;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'afterUpdate', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.afterUpdate;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'beforeUpdate', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.beforeUpdate;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'createEventDispatcher', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.createEventDispatcher;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'getAllContexts', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.getAllContexts;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'getContext', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.getContext;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'hasContext', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.hasContext;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'onDestroy', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.onDestroy;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'onMount', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.onMount;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'setContext', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.setContext;
|
||||
}
|
||||
});
|
||||
Object.defineProperty(exports, 'tick', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return internal.tick;
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"name": "string.prototype.trimend",
|
||||
"version": "1.0.6",
|
||||
"author": "Jordan Harband <ljharb@gmail.com>",
|
||||
"contributors": [
|
||||
"Jordan Harband <ljharb@gmail.com>",
|
||||
"Khaled Al-Ansari <khaledelansari@gmail.com>"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"description": "ES2019 spec-compliant String.prototype.trimEnd shim.",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"prepack": "npmignore --auto --commentLines=autogenerated",
|
||||
"prepublish": "not-in-publish || npm run prepublishOnly",
|
||||
"prepublishOnly": "safe-publish-latest",
|
||||
"lint": "eslint --ext=js,mjs .",
|
||||
"postlint": "es-shim-api --bound",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"posttest": "aud --production",
|
||||
"tests-only": "nyc tape 'test/**/*.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/es-shims/String.prototype.trimEnd.git"
|
||||
},
|
||||
"keywords": [
|
||||
"es6",
|
||||
"es7",
|
||||
"es8",
|
||||
"javascript",
|
||||
"prototype",
|
||||
"polyfill",
|
||||
"utility",
|
||||
"trim",
|
||||
"trimLeft",
|
||||
"trimRight",
|
||||
"trimStart",
|
||||
"trimEnd",
|
||||
"tc39"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@es-shims/api": "^2.2.3",
|
||||
"@ljharb/eslint-config": "^21.0.0",
|
||||
"aud": "^2.0.1",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"eslint": "=8.8.0",
|
||||
"functions-have-names": "^1.2.3",
|
||||
"has-strict-mode": "^1.0.1",
|
||||
"in-publish": "^2.0.1",
|
||||
"npmignore": "^0.3.0",
|
||||
"nyc": "^10.3.2",
|
||||
"safe-publish-latest": "^2.0.0",
|
||||
"tape": "^5.6.1"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"dependencies": {
|
||||
"call-bind": "^1.0.2",
|
||||
"define-properties": "^1.1.4",
|
||||
"es-abstract": "^1.20.4"
|
||||
},
|
||||
"publishConfig": {
|
||||
"ignore": [
|
||||
".github/workflows"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import type Settings from '../settings';
|
||||
import type { Entry } from '../types';
|
||||
export declare function read(directory: string, settings: Settings): Entry[];
|
||||
export declare function readdirWithFileTypes(directory: string, settings: Settings): Entry[];
|
||||
export declare function readdir(directory: string, settings: Settings): Entry[];
|
||||
@@ -0,0 +1,121 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var inspect = require('object-inspect');
|
||||
var forEach = require('for-each');
|
||||
|
||||
var SLOT = require('../');
|
||||
|
||||
test('assert', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.assert(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.assert({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
t['throws'](
|
||||
function () { SLOT.assert({}, 'whatever'); },
|
||||
TypeError,
|
||||
'nonexistent slot throws'
|
||||
);
|
||||
|
||||
var o = {};
|
||||
SLOT.set(o, 'x');
|
||||
t.doesNotThrow(function () { SLOT.assert(o, 'x'); }, 'existent slot noops');
|
||||
t['throws'](function () { SLOT.assert(o, 'y'); }, 'thing with a slot throws on a nonexistent slot');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('has', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.has(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.has({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
var o = {};
|
||||
|
||||
t.equal(SLOT.has(o, 'nonexistent'), false, 'nonexistent slot yields false');
|
||||
|
||||
SLOT.set(o, 'foo');
|
||||
t.equal(SLOT.has(o, 'foo'), true, 'existent slot yields true');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('get', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.get(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.get({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
var o = {};
|
||||
t.equal(SLOT.get(o, 'nonexistent'), undefined, 'nonexistent slot is undefined');
|
||||
|
||||
var v = {};
|
||||
SLOT.set(o, 'f', v);
|
||||
t.equal(SLOT.get(o, 'f'), v, '"get" retrieves value set by "set"');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('set', function (t) {
|
||||
forEach([null, undefined, true, false, 'foo', '', 42, 0], function (primitive) {
|
||||
t['throws'](
|
||||
function () { SLOT.set(primitive, ''); },
|
||||
TypeError,
|
||||
inspect(primitive) + ' is not an Object'
|
||||
);
|
||||
});
|
||||
|
||||
forEach([null, undefined, true, false, 42, 0, {}, [], function () {}, /a/g], function (nonString) {
|
||||
t['throws'](
|
||||
function () { SLOT.set({}, nonString); },
|
||||
TypeError,
|
||||
inspect(nonString) + ' is not a String'
|
||||
);
|
||||
});
|
||||
|
||||
var o = function () {};
|
||||
t.equal(SLOT.get(o, 'f'), undefined, 'slot not set');
|
||||
|
||||
SLOT.set(o, 'f', 42);
|
||||
t.equal(SLOT.get(o, 'f'), 42, 'slot was set');
|
||||
|
||||
SLOT.set(o, 'f', Infinity);
|
||||
t.equal(SLOT.get(o, 'f'), Infinity, 'slot was set again');
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,44 @@
|
||||
import idb from './idb';
|
||||
|
||||
function isIndexedDBValid() {
|
||||
try {
|
||||
// Initialize IndexedDB; fall back to vendor-prefixed versions
|
||||
// if needed.
|
||||
if (!idb || !idb.open) {
|
||||
return false;
|
||||
}
|
||||
// We mimic PouchDB here;
|
||||
//
|
||||
// We test for openDatabase because IE Mobile identifies itself
|
||||
// as Safari. Oh the lulz...
|
||||
var isSafari =
|
||||
typeof openDatabase !== 'undefined' &&
|
||||
/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) &&
|
||||
!/Chrome/.test(navigator.userAgent) &&
|
||||
!/BlackBerry/.test(navigator.platform);
|
||||
|
||||
var hasFetch =
|
||||
typeof fetch === 'function' &&
|
||||
fetch.toString().indexOf('[native code') !== -1;
|
||||
|
||||
// Safari <10.1 does not meet our requirements for IDB support
|
||||
// (see: https://github.com/pouchdb/pouchdb/issues/5572).
|
||||
// Safari 10.1 shipped with fetch, we can use that to detect it.
|
||||
// Note: this creates issues with `window.fetch` polyfills and
|
||||
// overrides; see:
|
||||
// https://github.com/localForage/localForage/issues/856
|
||||
return (
|
||||
(!isSafari || hasFetch) &&
|
||||
typeof indexedDB !== 'undefined' &&
|
||||
// some outdated implementations of IDB that appear on Samsung
|
||||
// and HTC Android devices <4.4 are missing IDBKeyRange
|
||||
// See: https://github.com/mozilla/localForage/issues/128
|
||||
// See: https://github.com/mozilla/localForage/issues/272
|
||||
typeof IDBKeyRange !== 'undefined'
|
||||
);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export default isIndexedDBValid;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"F A B","2":"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 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","2":"DC tB I v J EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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","2":"I v","33":"J D E F A B C"},E:{"1":"E F A B C K L G LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D HC zB IC JC KC"},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","2":"F B C PC QC RC SC qB AC TC rB"},G:{"1":"E ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC VC WC XC YC"},H:{"2":"oC"},I:{"1":"I f sC BC tC uC","2":"tB pC qC rC"},J:{"1":"A","2":"D"},K:{"1":"h","2":"A B C 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:"Navigation Timing API"};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"node-fetch","version":"2.6.9","files":{"browser.js":{"checkedAt":1678883669923,"integrity":"sha512-SkBfLO20d2Ngr6nhxgh/Pt6Yqe6oW8EB99KSPq0lrW0se8jIiRF3YpOe7hHbfNWxuNCsKoZZT98uCJI9OJAa/Q==","mode":420,"size":781},"lib/index.es.js":{"checkedAt":1678883669925,"integrity":"sha512-aDDKzojF14qPrBhZWaOziJlCOyzzKhOsO2QApXQOf5JML8/pVraqcjIollzSNuKO8Uegy25QWOJxh78jJwPhpw==","mode":420,"size":45247},"lib/index.js":{"checkedAt":1678883669928,"integrity":"sha512-Ir3IVCnsf22dJMpmWuKyUS5r8UaGxpl4NpkIAWAd4ekYyXEmnS8fqFruOH9pYSEdLIWnXb5XvL8PFtq33rQiGw==","mode":420,"size":45655},"package.json":{"checkedAt":1678883669928,"integrity":"sha512-wJJ/NPEUm1JxoEU/RdycoGoYgMWS5sYJNzpCUsE6InJS3uIwOeJyJO1QNd/eUWDcfpB99s6lFaThkCSMfedxYg==","mode":420,"size":2668},"LICENSE.md":{"checkedAt":1678883669928,"integrity":"sha512-ykmbVY/DSK9LQNr+KDnSVcHJUV9Nn6JFNWpe8/V3TAXtdEG9hUp/24tFut6S/Bpz4iNziTeDwyJi3dnomDuo4Q==","mode":420,"size":1079},"README.md":{"checkedAt":1678883669929,"integrity":"sha512-Phsxd2s74auCe0n8B2/Z9IXvl7+FMTuPtpcosJPXxDuIE6OqsveMo6WAEJx3uLN6SZHKCioKS2lG7kvXnljR3g==","mode":420,"size":21019},"lib/index.mjs":{"checkedAt":1678883669931,"integrity":"sha512-O84pxwc5rGWUrMoW2QCt7UbVuae546kl5xKjEVfA7/1r6gEr7G+aUeuqxRSCacw6ib789+yxbkzIq5ff/N44Bg==","mode":420,"size":45173}}}
|
||||
@@ -0,0 +1,66 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { OperatorFunction } from '../types';
|
||||
/**
|
||||
* Branch out the source Observable values as a nested Observable with each
|
||||
* nested Observable emitting at most `windowSize` values.
|
||||
*
|
||||
* <span class="informal">It's like {@link bufferCount}, but emits a nested
|
||||
* Observable instead of an array.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* Returns an Observable that emits windows of items it collects from the source
|
||||
* Observable. The output Observable emits windows every `startWindowEvery`
|
||||
* items, each containing no more than `windowSize` items. When the source
|
||||
* Observable completes or encounters an error, the output Observable emits
|
||||
* the current window and propagates the notification from the source
|
||||
* Observable. If `startWindowEvery` is not provided, then new windows are
|
||||
* started immediately at the start of the source and when each window completes
|
||||
* with size `windowSize`.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* Ignore every 3rd click event, starting from the first one
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, windowCount, map, skip, mergeAll } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(
|
||||
* windowCount(3),
|
||||
* map(win => win.pipe(skip(1))), // skip first of every 3 clicks
|
||||
* mergeAll() // flatten the Observable-of-Observables
|
||||
* );
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* Ignore every 3rd click event, starting from the third one
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, windowCount, mergeAll } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(
|
||||
* windowCount(2, 3),
|
||||
* mergeAll() // flatten the Observable-of-Observables
|
||||
* );
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* @see {@link window}
|
||||
* @see {@link windowTime}
|
||||
* @see {@link windowToggle}
|
||||
* @see {@link windowWhen}
|
||||
* @see {@link bufferCount}
|
||||
*
|
||||
* @param {number} windowSize The maximum number of values emitted by each
|
||||
* window.
|
||||
* @param {number} [startWindowEvery] Interval at which to start a new window.
|
||||
* For example if `startWindowEvery` is `2`, then a new window will be started
|
||||
* on every other value from the source. A new window is started at the
|
||||
* beginning of the source by default.
|
||||
* @return A function that returns an Observable of windows, which in turn are
|
||||
* Observable of values.
|
||||
*/
|
||||
export declare function windowCount<T>(windowSize: number, startWindowEvery?: number): OperatorFunction<T, Observable<T>>;
|
||||
//# sourceMappingURL=windowCount.d.ts.map
|
||||
@@ -0,0 +1,51 @@
|
||||
# isexe
|
||||
|
||||
Minimal module to check if a file is executable, and a normal file.
|
||||
|
||||
Uses `fs.stat` and tests against the `PATHEXT` environment variable on
|
||||
Windows.
|
||||
|
||||
## USAGE
|
||||
|
||||
```javascript
|
||||
var isexe = require('isexe')
|
||||
isexe('some-file-name', function (err, isExe) {
|
||||
if (err) {
|
||||
console.error('probably file does not exist or something', err)
|
||||
} else if (isExe) {
|
||||
console.error('this thing can be run')
|
||||
} else {
|
||||
console.error('cannot be run')
|
||||
}
|
||||
})
|
||||
|
||||
// same thing but synchronous, throws errors
|
||||
var isExe = isexe.sync('some-file-name')
|
||||
|
||||
// treat errors as just "not executable"
|
||||
isexe('maybe-missing-file', { ignoreErrors: true }, callback)
|
||||
var isExe = isexe.sync('maybe-missing-file', { ignoreErrors: true })
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `isexe(path, [options], [callback])`
|
||||
|
||||
Check if the path is executable. If no callback provided, and a
|
||||
global `Promise` object is available, then a Promise will be returned.
|
||||
|
||||
Will raise whatever errors may be raised by `fs.stat`, unless
|
||||
`options.ignoreErrors` is set to true.
|
||||
|
||||
### `isexe.sync(path, [options])`
|
||||
|
||||
Same as `isexe` but returns the value and throws any errors raised.
|
||||
|
||||
### Options
|
||||
|
||||
* `ignoreErrors` Treat all errors as "no, this is not executable", but
|
||||
don't raise them.
|
||||
* `uid` Number to use as the user id
|
||||
* `gid` Number to use as the group id
|
||||
* `pathExt` List of path extensions to use instead of `PATHEXT`
|
||||
environment variable on Windows.
|
||||
@@ -0,0 +1,36 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var isDate = require('../');
|
||||
var hasToStringTag = require('has-tostringtag/shams')();
|
||||
|
||||
test('not Dates', function (t) {
|
||||
t.notOk(isDate(), 'undefined is not Date');
|
||||
t.notOk(isDate(null), 'null is not Date');
|
||||
t.notOk(isDate(false), 'false is not Date');
|
||||
t.notOk(isDate(true), 'true is not Date');
|
||||
t.notOk(isDate(42), 'number is not Date');
|
||||
t.notOk(isDate('foo'), 'string is not Date');
|
||||
t.notOk(isDate([]), 'array is not Date');
|
||||
t.notOk(isDate({}), 'object is not Date');
|
||||
t.notOk(isDate(function () {}), 'function is not Date');
|
||||
t.notOk(isDate(/a/g), 'regex literal is not Date');
|
||||
t.notOk(isDate(new RegExp('a', 'g')), 'regex object is not Date');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('@@toStringTag', { skip: !hasToStringTag }, function (t) {
|
||||
var realDate = new Date();
|
||||
var fakeDate = {
|
||||
toString: function () { return String(realDate); },
|
||||
valueOf: function () { return realDate.getTime(); }
|
||||
};
|
||||
fakeDate[Symbol.toStringTag] = 'Date';
|
||||
t.notOk(isDate(fakeDate), 'fake Date with @@toStringTag "Date" is not Date');
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('Dates', function (t) {
|
||||
t.ok(isDate(new Date()), 'new Date() is Date');
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
export type ApiResult = {
|
||||
readonly url: string;
|
||||
readonly ok: boolean;
|
||||
readonly status: number;
|
||||
readonly statusText: string;
|
||||
readonly body: any;
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,133 @@
|
||||
import { Subscriber } from '../Subscriber';
|
||||
import { ObservableInput, OperatorFunction, ObservedValueOf } from '../types';
|
||||
import { innerFrom } from '../observable/innerFrom';
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
|
||||
/* tslint:disable:max-line-length */
|
||||
export function switchMap<T, O extends ObservableInput<any>>(
|
||||
project: (value: T, index: number) => O
|
||||
): OperatorFunction<T, ObservedValueOf<O>>;
|
||||
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
|
||||
export function switchMap<T, O extends ObservableInput<any>>(
|
||||
project: (value: T, index: number) => O,
|
||||
resultSelector: undefined
|
||||
): OperatorFunction<T, ObservedValueOf<O>>;
|
||||
/** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
|
||||
export function switchMap<T, R, O extends ObservableInput<any>>(
|
||||
project: (value: T, index: number) => O,
|
||||
resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
|
||||
): OperatorFunction<T, R>;
|
||||
/* tslint:enable:max-line-length */
|
||||
|
||||
/**
|
||||
* Projects each source value to an Observable which is merged in the output
|
||||
* Observable, emitting values only from the most recently projected Observable.
|
||||
*
|
||||
* <span class="informal">Maps each value to an Observable, then flattens all of
|
||||
* these inner Observables.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* Returns an Observable that emits items based on applying a function that you
|
||||
* supply to each item emitted by the source Observable, where that function
|
||||
* returns an (so-called "inner") Observable. Each time it observes one of these
|
||||
* inner Observables, the output Observable begins emitting the items emitted by
|
||||
* that inner Observable. When a new inner Observable is emitted, `switchMap`
|
||||
* stops emitting items from the earlier-emitted inner Observable and begins
|
||||
* emitting items from the new one. It continues to behave like this for
|
||||
* subsequent inner Observables.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* Generate new Observable according to source Observable values
|
||||
*
|
||||
* ```ts
|
||||
* import { of, switchMap } from 'rxjs';
|
||||
*
|
||||
* const switched = of(1, 2, 3).pipe(switchMap(x => of(x, x ** 2, x ** 3)));
|
||||
* switched.subscribe(x => console.log(x));
|
||||
* // outputs
|
||||
* // 1
|
||||
* // 1
|
||||
* // 1
|
||||
* // 2
|
||||
* // 4
|
||||
* // 8
|
||||
* // 3
|
||||
* // 9
|
||||
* // 27
|
||||
* ```
|
||||
*
|
||||
* Restart an interval Observable on every click event
|
||||
*
|
||||
* ```ts
|
||||
* import { fromEvent, switchMap, interval } from 'rxjs';
|
||||
*
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const result = clicks.pipe(switchMap(() => interval(1000)));
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* @see {@link concatMap}
|
||||
* @see {@link exhaustMap}
|
||||
* @see {@link mergeMap}
|
||||
* @see {@link switchAll}
|
||||
* @see {@link switchMapTo}
|
||||
*
|
||||
* @param {function(value: T, index: number): ObservableInput} project A function
|
||||
* that, when applied to an item emitted by the source Observable, returns an
|
||||
* Observable.
|
||||
* @return A function that returns an Observable that emits the result of
|
||||
* applying the projection function (and the optional deprecated
|
||||
* `resultSelector`) to each item emitted by the source Observable and taking
|
||||
* only the values from the most recently projected inner Observable.
|
||||
*/
|
||||
export function switchMap<T, R, O extends ObservableInput<any>>(
|
||||
project: (value: T, index: number) => O,
|
||||
resultSelector?: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R
|
||||
): OperatorFunction<T, ObservedValueOf<O> | R> {
|
||||
return operate((source, subscriber) => {
|
||||
let innerSubscriber: Subscriber<ObservedValueOf<O>> | null = null;
|
||||
let index = 0;
|
||||
// Whether or not the source subscription has completed
|
||||
let isComplete = false;
|
||||
|
||||
// We only complete the result if the source is complete AND we don't have an active inner subscription.
|
||||
// This is called both when the source completes and when the inners complete.
|
||||
const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();
|
||||
|
||||
source.subscribe(
|
||||
createOperatorSubscriber(
|
||||
subscriber,
|
||||
(value) => {
|
||||
// Cancel the previous inner subscription if there was one
|
||||
innerSubscriber?.unsubscribe();
|
||||
let innerIndex = 0;
|
||||
const outerIndex = index++;
|
||||
// Start the next inner subscription
|
||||
innerFrom(project(value, outerIndex)).subscribe(
|
||||
(innerSubscriber = createOperatorSubscriber(
|
||||
subscriber,
|
||||
// When we get a new inner value, next it through. Note that this is
|
||||
// handling the deprecate result selector here. This is because with this architecture
|
||||
// it ends up being smaller than using the map operator.
|
||||
(innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue),
|
||||
() => {
|
||||
// The inner has completed. Null out the inner subscriber to
|
||||
// free up memory and to signal that we have no inner subscription
|
||||
// currently.
|
||||
innerSubscriber = null!;
|
||||
checkComplete();
|
||||
}
|
||||
))
|
||||
);
|
||||
},
|
||||
() => {
|
||||
isComplete = true;
|
||||
checkComplete();
|
||||
}
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"available-typed-arrays","version":"1.0.5","files":{".eslintignore":{"checkedAt":1678883671537,"integrity":"sha512-VLhEcqup3IHXtZJPt07ZYoA9JNRjy1jhU/NU41Yw4E8mEyea/z+6bw5hL3lhCO09pji9E0BH2Q3aDXdc3i9zBg==","mode":420,"size":10},".nycrc":{"checkedAt":1678883669555,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},".eslintrc":{"checkedAt":1678883671601,"integrity":"sha512-17/Od2qobsAC85xAY5EfJXaX0WM9TBPfBzMnBpMuF1jedUpqMB4WTq1HuddFkGzNY43hsJuPK59JK+rmoJORag==","mode":420,"size":83},"index.js":{"checkedAt":1678883671601,"integrity":"sha512-Yrl2KI3H2WQESUOG6exVLD8YvvBZYHNh2p9ZDIUeNK9wjvSMATX9Z/bcugM0o/8/gCzIObLSqs6jkmq+fT7Mfg==","mode":420,"size":519},"test/index.js":{"checkedAt":1678883671601,"integrity":"sha512-wlbl8gGx2hlRUNls3rXrMC8Z/UTsK9+AF6wwfOjgWylzfa9HlEEK7gZLxO9WAubwnapN3W1dvpAY+lNxH2URFA==","mode":420,"size":502},"LICENSE":{"checkedAt":1678883671601,"integrity":"sha512-Pg0j9BX+Fmp8mAx1XW2wDVYsnbXuEq5QKBINQE+k1CyfdfAzv0tb/KUpKlAfmNVDddSa6Px43FQXpmTJrbd2Jw==","mode":420,"size":1067},"package.json":{"checkedAt":1678883671601,"integrity":"sha512-jyd8FzVxB9Y+71bnvUxHWPdZEiRL2AvHhwtaPlGR6+mIBkORobc01f5Qyg5tUnvH+SHKfhqmx56jplqxA96tiw==","mode":420,"size":2167},"CHANGELOG.md":{"checkedAt":1678883671611,"integrity":"sha512-6Z95jiNYRapH4Ff9v4YcoGJMzwWfsktp/n5aosZkD8YOA6AOxQlFgWIOdknNd0TsM1jKwYGBkVsYeKqzC6pLEQ==","mode":420,"size":7083},"README.md":{"checkedAt":1678883671611,"integrity":"sha512-vVo9zIkmZfZCXP+8+fGj0g1tIbfdfA3u1yjwDOOzPDLkGrIXcxyv/BSOhgu2wRkTnekA6oPDYnXi2+FD1GE/ng==","mode":420,"size":1966},".github/FUNDING.yml":{"checkedAt":1678883671611,"integrity":"sha512-Dl/BLfYM+qiqRJDgPro4zTkYO/js+PPRyAKmCM+ZIphI8S2w1fbetqhrpMQj7SF7frWT7lab5/mLTTX9OrpE1w==","mode":420,"size":593}}}
|
||||
@@ -0,0 +1,7 @@
|
||||
export type Scan = {
|
||||
id: number;
|
||||
runner: string;
|
||||
valid: boolean;
|
||||
_distance: number;
|
||||
distance: number;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import { extend } from '../utils';
|
||||
|
||||
/**
|
||||
* Create a new object with "null"-prototype to avoid truthy results on prototype properties.
|
||||
* The resulting object can be used with "object[property]" to check if a property exists
|
||||
* @param {...object} sources a varargs parameter of source objects that will be merged
|
||||
* @returns {object}
|
||||
*/
|
||||
export function createNewLookupObject(...sources) {
|
||||
return extend(Object.create(null), ...sources);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"micromatch","version":"4.0.5","files":{"LICENSE":{"checkedAt":1678883670925,"integrity":"sha512-cjkrzNiWTIjsiqPYFXRqK2pEZtnHyo9CjX0PPiuxFnTvSUyjNciyVe7lglwIene7RaXWACXzGLeKZOGb7M0jxw==","mode":493,"size":1091},"index.js":{"checkedAt":1678883670925,"integrity":"sha512-n+iWYw8GwMojP2vbeuJA+TzdZx0RkrkOnTMZV1rS1H1S6zgzWpc4FHLVXKpcSS+fx7ihu2Tuc+UulJstKOcjtg==","mode":420,"size":13741},"package.json":{"checkedAt":1678883670926,"integrity":"sha512-EPr1Yz3BHOdo2tHOKBG+RVLf7ci3zddjOmEOg2gPeuMGtx+r6R2bVKAlrB2zyeRql8VmYVsNDoeStNM0jh/6Aw==","mode":420,"size":2648},"README.md":{"checkedAt":1678883670932,"integrity":"sha512-kqV3KfApyppik/eMmDQ8TaR9ARtzSg00P0jCRhP1WPBgTgxI/FFqUk19odlKhg7SQUiL+dTXwC66MUb1nkg0cw==","mode":420,"size":38467}}}
|
||||
@@ -0,0 +1,53 @@
|
||||
# async-retry
|
||||
|
||||
Retrying made simple, easy, and async.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
// Packages
|
||||
const retry = require('async-retry');
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
await retry(
|
||||
async (bail) => {
|
||||
// if anything throws, we retry
|
||||
const res = await fetch('https://google.com');
|
||||
|
||||
if (403 === res.status) {
|
||||
// don't retry upon 403
|
||||
bail(new Error('Unauthorized'));
|
||||
return;
|
||||
}
|
||||
|
||||
const data = await res.text();
|
||||
return data.substr(0, 500);
|
||||
},
|
||||
{
|
||||
retries: 5,
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
### API
|
||||
|
||||
```js
|
||||
retry(retrier : Function, opts : Object) => Promise
|
||||
```
|
||||
|
||||
- The supplied function can be `async` or not. In other words, it can be a function that returns a `Promise` or a value.
|
||||
- The supplied function receives two parameters
|
||||
1. A `Function` you can invoke to abort the retrying (bail)
|
||||
2. A `Number` identifying the attempt. The absolute first attempt (before any retries) is `1`.
|
||||
- The `opts` are passed to `node-retry`. Read [its docs](https://github.com/tim-kos/node-retry)
|
||||
- `retries`: The maximum amount of times to retry the operation. Default is `10`.
|
||||
- `factor`: The exponential factor to use. Default is `2`.
|
||||
- `minTimeout`: The number of milliseconds before starting the first retry. Default is `1000`.
|
||||
- `maxTimeout`: The maximum number of milliseconds between two retries. Default is `Infinity`.
|
||||
- `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `true`.
|
||||
- `onRetry`: an optional `Function` that is invoked after a new retry is performed. It's passed the `Error` that triggered it as a parameter.
|
||||
|
||||
## Authors
|
||||
|
||||
- Guillermo Rauch ([@rauchg](https://twitter.com/rauchg)) - [Vercel](https://vercel.com)
|
||||
- Leo Lamprecht ([@notquiteleo](https://twitter.com/notquiteleo)) - [Vercel](https://vercel.com)
|
||||
@@ -0,0 +1,8 @@
|
||||
F_Year,Event ID,Event Date,Time,Location,Rotue,TOC,Person type,Injury degree,FWI,Precursor,Gender,Under 16,Apparent age,Fatal,Alcohol/Drugs,Impairment,Encumbrances & Group Travel,Risk-taking Behaviour,Sub-standard conditions,Design,Operational error,Crowd management,Non-standard operation,Rushing,3rd Party Behaviour,Narrative Full,Period
|
||||
2013/2014,2914930,3/2/14,23:02:00,Pembrey and Burry Port,Wales,Arriva Trains Wales,Passenger,Minor non-reportable,0.001,Passenger falls from platform onto track (no electric shock nor struck by train) under the influence,Male,,Unknown,,x,,,,,,,,,,,"A report was initially received from Dyfed Powys Police that a person had been struck by a train at Pembrey and Burry Port station and that an ambulance was in attendance (the ambulance was the source of the police report). It later transpired that the person was inebriated and had fallen off of Pembrey platform after attempting to board the train after the doors were closed and the train was ready to depart. It has been confirmed (by Pembrey signaller) that the person has not been struck by the train and has NOT fallen under the train. One police officer on site.
|
||||
|
||||
Later advice from the train crew working 2B21 2135 Milford Haven to Cardiff Central stated the person had attempted to board 2B21 as it was ready to depart from the platform, bounced off of the train falling backwards, had then gotten back up and then fallen off of the platform and onto the track behind the train. The persons injuries (if any) have not been disclosed.
|
||||
|
||||
The person was been removed from the track and normal working resumed from 2326. The on call MOM was called to attend and act a RIO if required, but was stood down after the incident was resolved.
|
||||
|
||||
The initial call came from Dyfed Powys Police under reference 333 when it was advised that their report had come from the Ambulance Service (reference 1523673) and the BTP were also made aware by Dyfed Powys Police under their reference 470.",13
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
var convert = require('./convert'),
|
||||
func = convert('flatMapDepth', require('../flatMapDepth'));
|
||||
|
||||
func.placeholder = require('./placeholder');
|
||||
module.exports = func;
|
||||
@@ -0,0 +1,5 @@
|
||||
export type CreateRunnerTeam = {
|
||||
parentGroup: number;
|
||||
name: string;
|
||||
contact?: number;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"innerFrom.js","sourceRoot":"","sources":["../../../../src/internal/observable/innerFrom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAkD;AAClD,+CAA8C;AAC9C,4CAA2C;AAE3C,mEAAkE;AAClE,2DAA0D;AAC1D,yEAAkF;AAClF,iDAAgD;AAChD,qEAAwG;AAExG,iDAAgD;AAChD,qEAAoE;AACpE,mDAAuE;AAGvE,SAAgB,SAAS,CAAI,KAAyB;IACpD,IAAI,KAAK,YAAY,uBAAU,EAAE;QAC/B,OAAO,KAAK,CAAC;KACd;IACD,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,IAAI,yCAAmB,CAAC,KAAK,CAAC,EAAE;YAC9B,OAAO,qBAAqB,CAAC,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,yBAAW,CAAC,KAAK,CAAC,EAAE;YACtB,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;SAC7B;QACD,IAAI,qBAAS,CAAC,KAAK,CAAC,EAAE;YACpB,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;SAC3B;QACD,IAAI,iCAAe,CAAC,KAAK,CAAC,EAAE;YAC1B,OAAO,iBAAiB,CAAC,KAAK,CAAC,CAAC;SACjC;QACD,IAAI,uBAAU,CAAC,KAAK,CAAC,EAAE;YACrB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;SAC5B;QACD,IAAI,2CAAoB,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,sBAAsB,CAAC,KAAK,CAAC,CAAC;SACtC;KACF;IAED,MAAM,yDAAgC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AA1BD,8BA0BC;AAMD,SAAgB,qBAAqB,CAAI,GAAQ;IAC/C,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAC9C,IAAM,GAAG,GAAG,GAAG,CAAC,uBAAiB,CAAC,EAAE,CAAC;QACrC,IAAI,uBAAU,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC7B,OAAO,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;SAClC;QAED,MAAM,IAAI,SAAS,CAAC,gEAAgE,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACL,CAAC;AATD,sDASC;AASD,SAAgB,aAAa,CAAI,KAAmB;IAClD,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAU9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC3D,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3B;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAhBD,sCAgBC;AAED,SAAgB,WAAW,CAAI,OAAuB;IACpD,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO;aACJ,IAAI,CACH,UAAC,KAAK;YACJ,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;gBACtB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,UAAU,CAAC,QAAQ,EAAE,CAAC;aACvB;QACH,CAAC,EACD,UAAC,GAAQ,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CACpC;aACA,IAAI,CAAC,IAAI,EAAE,2CAAoB,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC;AAdD,kCAcC;AAED,SAAgB,YAAY,CAAI,QAAqB;IACnD,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;;;YAC9C,KAAoB,IAAA,aAAA,SAAA,QAAQ,CAAA,kCAAA,wDAAE;gBAAzB,IAAM,KAAK,qBAAA;gBACd,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;gBACvB,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,OAAO;iBACR;aACF;;;;;;;;;QACD,UAAU,CAAC,QAAQ,EAAE,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,oCAUC;AAED,SAAgB,iBAAiB,CAAI,aAA+B;IAClE,OAAO,IAAI,uBAAU,CAAC,UAAC,UAAyB;QAC9C,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,KAAK,CAAC,UAAC,GAAG,IAAK,OAAA,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,EAArB,CAAqB,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAJD,8CAIC;AAED,SAAgB,sBAAsB,CAAI,cAAqC;IAC7E,OAAO,iBAAiB,CAAC,yDAAkC,CAAC,cAAc,CAAC,CAAC,CAAC;AAC/E,CAAC;AAFD,wDAEC;AAED,SAAe,OAAO,CAAI,aAA+B,EAAE,UAAyB;;;;;;;;;oBACxD,kBAAA,cAAA,aAAa,CAAA;;;;;oBAAtB,KAAK,0BAAA,CAAA;oBACpB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBAGvB,IAAI,UAAU,CAAC,MAAM,EAAE;wBACrB,WAAO;qBACR;;;;;;;;;;;;;;;;;;;;;oBAEH,UAAU,CAAC,QAAQ,EAAE,CAAC;;;;;CACvB"}
|
||||
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
|
||||
module.exports = {
|
||||
"#": require("./#"),
|
||||
"escape": require("./escape"),
|
||||
"isRegExp": require("./is-reg-exp"),
|
||||
"validRegExp": require("./valid-reg-exp")
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
Object.defineProperty(exports, "default", {
|
||||
enumerable: true,
|
||||
get: ()=>_default
|
||||
});
|
||||
function _default(pluginConfig, plugins) {
|
||||
if (pluginConfig === undefined) {
|
||||
return plugins;
|
||||
}
|
||||
const pluginNames = Array.isArray(pluginConfig) ? pluginConfig : [
|
||||
...new Set(plugins.filter((pluginName)=>{
|
||||
return pluginConfig !== false && pluginConfig[pluginName] !== false;
|
||||
}).concat(Object.keys(pluginConfig).filter((pluginName)=>{
|
||||
return pluginConfig[pluginName] !== false;
|
||||
})))
|
||||
];
|
||||
return pluginNames;
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
{
|
||||
"name": "yargs",
|
||||
"version": "17.7.1",
|
||||
"description": "yargs the modern, pirate-themed, successor to optimist.",
|
||||
"main": "./index.cjs",
|
||||
"exports": {
|
||||
"./package.json": "./package.json",
|
||||
".": [
|
||||
{
|
||||
"import": "./index.mjs",
|
||||
"require": "./index.cjs"
|
||||
},
|
||||
"./index.cjs"
|
||||
],
|
||||
"./helpers": {
|
||||
"import": "./helpers/helpers.mjs",
|
||||
"require": "./helpers/index.js"
|
||||
},
|
||||
"./browser": {
|
||||
"import": "./browser.mjs",
|
||||
"types": "./browser.d.ts"
|
||||
},
|
||||
"./yargs": [
|
||||
{
|
||||
"import": "./yargs.mjs",
|
||||
"require": "./yargs"
|
||||
},
|
||||
"./yargs"
|
||||
]
|
||||
},
|
||||
"type": "module",
|
||||
"module": "./index.mjs",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Yargs Contributors",
|
||||
"url": "https://github.com/yargs/yargs/graphs/contributors"
|
||||
}
|
||||
],
|
||||
"files": [
|
||||
"browser.mjs",
|
||||
"browser.d.ts",
|
||||
"index.cjs",
|
||||
"helpers/*.js",
|
||||
"helpers/*",
|
||||
"index.mjs",
|
||||
"yargs",
|
||||
"yargs.mjs",
|
||||
"build",
|
||||
"locales",
|
||||
"LICENSE",
|
||||
"lib/platform-shims/*.mjs",
|
||||
"!*.d.ts",
|
||||
"!**/*.d.ts"
|
||||
],
|
||||
"dependencies": {
|
||||
"cliui": "^8.0.1",
|
||||
"escalade": "^3.1.1",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"require-directory": "^2.1.1",
|
||||
"string-width": "^4.2.3",
|
||||
"y18n": "^5.0.5",
|
||||
"yargs-parser": "^21.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "^4.2.11",
|
||||
"@types/mocha": "^9.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"c8": "^7.7.0",
|
||||
"chai": "^4.2.0",
|
||||
"chalk": "^4.0.0",
|
||||
"coveralls": "^3.0.9",
|
||||
"cpr": "^3.0.1",
|
||||
"cross-env": "^7.0.2",
|
||||
"cross-spawn": "^7.0.0",
|
||||
"eslint": "^7.23.0",
|
||||
"gts": "^3.0.0",
|
||||
"hashish": "0.0.4",
|
||||
"mocha": "^9.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.23.0",
|
||||
"rollup-plugin-cleanup": "^3.1.1",
|
||||
"rollup-plugin-terser": "^7.0.2",
|
||||
"rollup-plugin-ts": "^2.0.4",
|
||||
"typescript": "^4.0.2",
|
||||
"which": "^2.0.0",
|
||||
"yargs-test-extends": "^1.0.1"
|
||||
},
|
||||
"scripts": {
|
||||
"fix": "gts fix && npm run fix:js",
|
||||
"fix:js": "eslint . --ext cjs --ext mjs --ext js --fix",
|
||||
"posttest": "npm run check",
|
||||
"test": "c8 mocha --enable-source-maps ./test/*.cjs --require ./test/before.cjs --timeout=12000 --check-leaks",
|
||||
"test:esm": "c8 mocha --enable-source-maps ./test/esm/*.mjs --check-leaks",
|
||||
"coverage": "c8 report --check-coverage",
|
||||
"prepare": "npm run compile",
|
||||
"pretest": "npm run compile -- -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs",
|
||||
"compile": "rimraf build && tsc",
|
||||
"postcompile": "npm run build:cjs",
|
||||
"build:cjs": "rollup -c rollup.config.cjs",
|
||||
"postbuild:cjs": "rimraf ./build/index.cjs.d.ts",
|
||||
"check": "gts lint && npm run check:js",
|
||||
"check:js": "eslint . --ext cjs --ext mjs --ext js",
|
||||
"clean": "gts clean"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yargs/yargs.git"
|
||||
},
|
||||
"homepage": "https://yargs.js.org/",
|
||||
"keywords": [
|
||||
"argument",
|
||||
"args",
|
||||
"option",
|
||||
"parser",
|
||||
"parsing",
|
||||
"cli",
|
||||
"command"
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"name": "type",
|
||||
"version": "1.2.0",
|
||||
"description": "Runtime validation and processing of JavaScript types",
|
||||
"author": "Mariusz Nowak <medyk@medikoo.com> (https://www.medikoo.com/)",
|
||||
"keywords": [
|
||||
"type",
|
||||
"coercion"
|
||||
],
|
||||
"repository": "medikoo/type",
|
||||
"devDependencies": {
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^6.4.0",
|
||||
"eslint-config-medikoo": "^2.5.1",
|
||||
"git-list-updated": "^1.2.1",
|
||||
"husky": "^3.0.5",
|
||||
"lint-staged": "^9.2.5",
|
||||
"mocha": "^6.2.0",
|
||||
"nyc": "^14.1.1",
|
||||
"prettier-elastic": "^1.18.2"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": [
|
||||
"eslint"
|
||||
],
|
||||
"*.{css,html,js,json,md,yaml,yml}": [
|
||||
"prettier -c"
|
||||
]
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "medikoo/es3",
|
||||
"root": true,
|
||||
"globals": {
|
||||
"Map": true,
|
||||
"Promise": true,
|
||||
"Set": true,
|
||||
"Symbol": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**/*.js",
|
||||
"env": {
|
||||
"mocha": true
|
||||
},
|
||||
"rules": {
|
||||
"no-eval": "off",
|
||||
"no-new-wrappers": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"string/coerce.js",
|
||||
"number/coerce.js"
|
||||
],
|
||||
"rules": {
|
||||
"no-implicit-coercion": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": "plain-object/is.js",
|
||||
"rules": {
|
||||
"no-proto": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 100,
|
||||
"tabWidth": 4,
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"*.md"
|
||||
],
|
||||
"options": {
|
||||
"tabWidth": 2
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"coverage": "nyc --reporter=lcov --reporter=html --reporter=text-summary npm test",
|
||||
"check-coverage": "npm run coverage && nyc check-coverage --statements 80 --function 80 --branches 80 --lines 80",
|
||||
"lint": "eslint --ignore-path=.gitignore .",
|
||||
"lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'",
|
||||
"prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
|
||||
"prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'",
|
||||
"test": "mocha --recursive"
|
||||
},
|
||||
"license": "ISC"
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
Copyright (c) 2013 Raynos.
|
||||
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user