new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var callBound = require('call-bind/callBound');
|
||||
var forEach = require('../helpers/forEach');
|
||||
var OwnPropertyKeys = require('../helpers/OwnPropertyKeys');
|
||||
|
||||
var $isEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
||||
|
||||
var CreateDataProperty = require('./CreateDataProperty');
|
||||
var Get = require('./Get');
|
||||
var IsArray = require('./IsArray');
|
||||
var IsInteger = require('./IsInteger');
|
||||
var IsPropertyKey = require('./IsPropertyKey');
|
||||
var SameValue = require('./SameValue');
|
||||
var ToNumber = require('./ToNumber');
|
||||
var ToObject = require('./ToObject');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/9.0/#sec-copydataproperties
|
||||
|
||||
module.exports = function CopyDataProperties(target, source, excludedItems) {
|
||||
if (Type(target) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: "target" must be an Object');
|
||||
}
|
||||
|
||||
if (!IsArray(excludedItems)) {
|
||||
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
|
||||
}
|
||||
for (var i = 0; i < excludedItems.length; i += 1) {
|
||||
if (!IsPropertyKey(excludedItems[i])) {
|
||||
throw new $TypeError('Assertion failed: "excludedItems" must be a List of Property Keys');
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof source === 'undefined' || source === null) {
|
||||
return target;
|
||||
}
|
||||
|
||||
var fromObj = ToObject(source);
|
||||
|
||||
var sourceKeys = OwnPropertyKeys(fromObj);
|
||||
forEach(sourceKeys, function (nextKey) {
|
||||
var excluded = false;
|
||||
|
||||
forEach(excludedItems, function (e) {
|
||||
if (SameValue(e, nextKey) === true) {
|
||||
excluded = true;
|
||||
}
|
||||
});
|
||||
|
||||
var enumerable = $isEnumerable(fromObj, nextKey) || (
|
||||
// this is to handle string keys being non-enumerable in older engines
|
||||
typeof source === 'string'
|
||||
&& nextKey >= 0
|
||||
&& IsInteger(ToNumber(nextKey))
|
||||
);
|
||||
if (excluded === false && enumerable) {
|
||||
var propValue = Get(fromObj, nextKey);
|
||||
CreateDataProperty(target, nextKey, propValue);
|
||||
}
|
||||
});
|
||||
|
||||
return target;
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
declare function isPromise(value: any): boolean;
|
||||
export default isPromise;
|
||||
@@ -0,0 +1,27 @@
|
||||
import { EmptyError } from './util/EmptyError';
|
||||
export function lastValueFrom(source, config) {
|
||||
const hasConfig = typeof config === 'object';
|
||||
return new Promise((resolve, reject) => {
|
||||
let _hasValue = false;
|
||||
let _value;
|
||||
source.subscribe({
|
||||
next: (value) => {
|
||||
_value = value;
|
||||
_hasValue = true;
|
||||
},
|
||||
error: reject,
|
||||
complete: () => {
|
||||
if (_hasValue) {
|
||||
resolve(_value);
|
||||
}
|
||||
else if (hasConfig) {
|
||||
resolve(config.defaultValue);
|
||||
}
|
||||
else {
|
||||
reject(new EmptyError());
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=lastValueFrom.js.map
|
||||
@@ -0,0 +1,31 @@
|
||||
import { SchedulerLike } from '../types';
|
||||
import { Observable } from '../Observable';
|
||||
import { executeSchedule } from '../util/executeSchedule';
|
||||
|
||||
export function scheduleAsyncIterable<T>(input: AsyncIterable<T>, scheduler: SchedulerLike) {
|
||||
if (!input) {
|
||||
throw new Error('Iterable cannot be null');
|
||||
}
|
||||
return new Observable<T>((subscriber) => {
|
||||
executeSchedule(subscriber, scheduler, () => {
|
||||
const iterator = input[Symbol.asyncIterator]();
|
||||
executeSchedule(
|
||||
subscriber,
|
||||
scheduler,
|
||||
() => {
|
||||
iterator.next().then((result) => {
|
||||
if (result.done) {
|
||||
// This will remove the subscriptions from
|
||||
// the parent subscription.
|
||||
subscriber.complete();
|
||||
} else {
|
||||
subscriber.next(result.value);
|
||||
}
|
||||
});
|
||||
},
|
||||
0,
|
||||
true
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"rules": {
|
||||
"id-length": 0,
|
||||
"new-cap": [2, {
|
||||
"capIsNewExceptions": [
|
||||
"RequireObjectCoercible",
|
||||
"ToString",
|
||||
],
|
||||
}],
|
||||
"no-invalid-this": 1,
|
||||
},
|
||||
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"id-length": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "slash",
|
||||
"version": "3.0.0",
|
||||
"description": "Convert Windows backslash paths to slash paths",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/slash",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"path",
|
||||
"seperator",
|
||||
"slash",
|
||||
"backslash",
|
||||
"windows",
|
||||
"convert"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { __read, __spreadArray } from "tslib";
|
||||
import { merge } from './merge';
|
||||
export function mergeWith() {
|
||||
var otherSources = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
otherSources[_i] = arguments[_i];
|
||||
}
|
||||
return merge.apply(void 0, __spreadArray([], __read(otherSources)));
|
||||
}
|
||||
//# sourceMappingURL=mergeWith.js.map
|
||||
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isBase32;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
var _merge = _interopRequireDefault(require("./util/merge"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var base32 = /^[A-Z2-7]+=*$/;
|
||||
var crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/;
|
||||
var defaultBase32Options = {
|
||||
crockford: false
|
||||
};
|
||||
|
||||
function isBase32(str, options) {
|
||||
(0, _assertString.default)(str);
|
||||
options = (0, _merge.default)(options, defaultBase32Options);
|
||||
|
||||
if (options.crockford) {
|
||||
return crockfordBase32.test(str);
|
||||
}
|
||||
|
||||
var len = str.length;
|
||||
|
||||
if (len % 8 === 0 && base32.test(str)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,40 @@
|
||||
var baseIsNative = require('./_baseIsNative'),
|
||||
isMaskable = require('./_isMaskable');
|
||||
|
||||
/** Error message constants. */
|
||||
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.';
|
||||
|
||||
/**
|
||||
* Checks if `value` is a pristine native function.
|
||||
*
|
||||
* **Note:** This method can't reliably detect native functions in the presence
|
||||
* of the core-js package because core-js circumvents this kind of detection.
|
||||
* Despite multiple requests, the core-js maintainer has made it clear: any
|
||||
* attempt to fix the detection will be obstructed. As a result, we're left
|
||||
* with little choice but to throw an error. Unfortunately, this also affects
|
||||
* packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
|
||||
* which rely on core-js.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a native function,
|
||||
* else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isNative(Array.prototype.push);
|
||||
* // => true
|
||||
*
|
||||
* _.isNative(_);
|
||||
* // => false
|
||||
*/
|
||||
function isNative(value) {
|
||||
if (isMaskable(value)) {
|
||||
throw new Error(CORE_ERROR_TEXT);
|
||||
}
|
||||
return baseIsNative(value);
|
||||
}
|
||||
|
||||
module.exports = isNative;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ComputeExponent.d.ts","sourceRoot":"","sources":["../../../../../../packages/ecma402-abstract/NumberFormat/ComputeExponent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,oBAAoB,EAAC,MAAM,iBAAiB,CAAA;AAEpD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,IAAI,CAAC,YAAY,EAC/B,CAAC,EAAE,MAAM,EACT,EACE,gBAAgB,GACjB,EAAE;IAAC,gBAAgB,CAAC,EAAE,EAAE,IAAI,CAAC,YAAY,GAAG,oBAAoB,CAAA;CAAC,GACjE,CAAC,MAAM,EAAE,MAAM,CAAC,CA8BlB"}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"github": {
|
||||
"release": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { Subject } from './Subject';
|
||||
import { TimestampProvider } from './types';
|
||||
/**
|
||||
* A variant of {@link Subject} that "replays" old values to new subscribers by emitting them when they first subscribe.
|
||||
*
|
||||
* `ReplaySubject` has an internal buffer that will store a specified number of values that it has observed. Like `Subject`,
|
||||
* `ReplaySubject` "observes" values by having them passed to its `next` method. When it observes a value, it will store that
|
||||
* value for a time determined by the configuration of the `ReplaySubject`, as passed to its constructor.
|
||||
*
|
||||
* When a new subscriber subscribes to the `ReplaySubject` instance, it will synchronously emit all values in its buffer in
|
||||
* a First-In-First-Out (FIFO) manner. The `ReplaySubject` will also complete, if it has observed completion; and it will
|
||||
* error if it has observed an error.
|
||||
*
|
||||
* There are two main configuration items to be concerned with:
|
||||
*
|
||||
* 1. `bufferSize` - This will determine how many items are stored in the buffer, defaults to infinite.
|
||||
* 2. `windowTime` - The amount of time to hold a value in the buffer before removing it from the buffer.
|
||||
*
|
||||
* Both configurations may exist simultaneously. So if you would like to buffer a maximum of 3 values, as long as the values
|
||||
* are less than 2 seconds old, you could do so with a `new ReplaySubject(3, 2000)`.
|
||||
*
|
||||
* ### Differences with BehaviorSubject
|
||||
*
|
||||
* `BehaviorSubject` is similar to `new ReplaySubject(1)`, with a couple of exceptions:
|
||||
*
|
||||
* 1. `BehaviorSubject` comes "primed" with a single value upon construction.
|
||||
* 2. `ReplaySubject` will replay values, even after observing an error, where `BehaviorSubject` will not.
|
||||
*
|
||||
* @see {@link Subject}
|
||||
* @see {@link BehaviorSubject}
|
||||
* @see {@link shareReplay}
|
||||
*/
|
||||
export declare class ReplaySubject<T> extends Subject<T> {
|
||||
private _bufferSize;
|
||||
private _windowTime;
|
||||
private _timestampProvider;
|
||||
private _buffer;
|
||||
private _infiniteTimeWindow;
|
||||
/**
|
||||
* @param bufferSize The size of the buffer to replay on subscription
|
||||
* @param windowTime The amount of time the buffered items will stay buffered
|
||||
* @param timestampProvider An object with a `now()` method that provides the current timestamp. This is used to
|
||||
* calculate the amount of time something has been buffered.
|
||||
*/
|
||||
constructor(_bufferSize?: number, _windowTime?: number, _timestampProvider?: TimestampProvider);
|
||||
next(value: T): void;
|
||||
private _trimBuffer;
|
||||
}
|
||||
//# sourceMappingURL=ReplaySubject.d.ts.map
|
||||
@@ -0,0 +1,2 @@
|
||||
if(typeof cptable === 'undefined') cptable = {};
|
||||
cptable[20285] = (function(){ var d = "\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,10 @@
|
||||
"use strict";
|
||||
|
||||
if (!require("./is-implemented")()) {
|
||||
Object.defineProperty(Math, "atanh", {
|
||||
value: require("./shim"),
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"combineLatest.js","sourceRoot":"","sources":["../../../../src/internal/observable/combineLatest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AA4L1D,MAAM,UAAU,aAAa;IAAoC,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,yBAAc;;IAC7E,IAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAEzC,IAAA,KAA8B,oBAAoB,CAAC,IAAI,CAAC,EAAhD,WAAW,UAAA,EAAE,IAAI,UAA+B,CAAC;IAE/D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;QAI5B,OAAO,IAAI,CAAC,EAAE,EAAE,SAAgB,CAAC,CAAC;KACnC;IAED,IAAM,MAAM,GAAG,IAAI,UAAU,CAC3B,iBAAiB,CACf,WAAoD,EACpD,SAAS,EACT,IAAI;QACF,CAAC;YACC,UAAC,MAAM,IAAK,OAAA,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,EAA1B,CAA0B;QACxC,CAAC;YACC,QAAQ,CACb,CACF,CAAC;IAEF,OAAO,cAAc,CAAC,CAAC,CAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAmB,CAAC,CAAC,CAAC,MAAM,CAAC;AACpG,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,WAAmC,EACnC,SAAyB,EACzB,cAAiD;IAAjD,+BAAA,EAAA,yBAAiD;IAEjD,OAAO,UAAC,UAA2B;QAGjC,aAAa,CACX,SAAS,EACT;YACU,IAAA,MAAM,GAAK,WAAW,OAAhB,CAAiB;YAE/B,IAAM,MAAM,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;YAGjC,IAAI,MAAM,GAAG,MAAM,CAAC;YAIpB,IAAI,oBAAoB,GAAG,MAAM,CAAC;oCAGzB,CAAC;gBACR,aAAa,CACX,SAAS,EACT;oBACE,IAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,SAAgB,CAAC,CAAC;oBACtD,IAAI,aAAa,GAAG,KAAK,CAAC;oBAC1B,MAAM,CAAC,SAAS,CACd,wBAAwB,CACtB,UAAU,EACV,UAAC,KAAK;wBAEJ,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;wBAClB,IAAI,CAAC,aAAa,EAAE;4BAElB,aAAa,GAAG,IAAI,CAAC;4BACrB,oBAAoB,EAAE,CAAC;yBACxB;wBACD,IAAI,CAAC,oBAAoB,EAAE;4BAGzB,UAAU,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;yBACjD;oBACH,CAAC,EACD;wBACE,IAAI,CAAC,EAAE,MAAM,EAAE;4BAGb,UAAU,CAAC,QAAQ,EAAE,CAAC;yBACvB;oBACH,CAAC,CACF,CACF,CAAC;gBACJ,CAAC,EACD,UAAU,CACX,CAAC;;YAlCJ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;wBAAtB,CAAC;aAmCT;QACH,CAAC,EACD,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAMD,SAAS,aAAa,CAAC,SAAoC,EAAE,OAAmB,EAAE,YAA0B;IAC1G,IAAI,SAAS,EAAE;QACb,eAAe,CAAC,YAAY,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;KACnD;SAAM;QACL,OAAO,EAAE,CAAC;KACX;AACH,CAAC"}
|
||||
@@ -0,0 +1,214 @@
|
||||
import { Subject, AnonymousSubject } from '../../Subject';
|
||||
import { Subscriber } from '../../Subscriber';
|
||||
import { Observable } from '../../Observable';
|
||||
import { Subscription } from '../../Subscription';
|
||||
import { ReplaySubject } from '../../ReplaySubject';
|
||||
const DEFAULT_WEBSOCKET_CONFIG = {
|
||||
url: '',
|
||||
deserializer: (e) => JSON.parse(e.data),
|
||||
serializer: (value) => JSON.stringify(value),
|
||||
};
|
||||
const WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }';
|
||||
export class WebSocketSubject extends AnonymousSubject {
|
||||
constructor(urlConfigOrSource, destination) {
|
||||
super();
|
||||
this._socket = null;
|
||||
if (urlConfigOrSource instanceof Observable) {
|
||||
this.destination = destination;
|
||||
this.source = urlConfigOrSource;
|
||||
}
|
||||
else {
|
||||
const config = (this._config = Object.assign({}, DEFAULT_WEBSOCKET_CONFIG));
|
||||
this._output = new Subject();
|
||||
if (typeof urlConfigOrSource === 'string') {
|
||||
config.url = urlConfigOrSource;
|
||||
}
|
||||
else {
|
||||
for (const key in urlConfigOrSource) {
|
||||
if (urlConfigOrSource.hasOwnProperty(key)) {
|
||||
config[key] = urlConfigOrSource[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!config.WebSocketCtor && WebSocket) {
|
||||
config.WebSocketCtor = WebSocket;
|
||||
}
|
||||
else if (!config.WebSocketCtor) {
|
||||
throw new Error('no WebSocket constructor can be found');
|
||||
}
|
||||
this.destination = new ReplaySubject();
|
||||
}
|
||||
}
|
||||
lift(operator) {
|
||||
const sock = new WebSocketSubject(this._config, this.destination);
|
||||
sock.operator = operator;
|
||||
sock.source = this;
|
||||
return sock;
|
||||
}
|
||||
_resetState() {
|
||||
this._socket = null;
|
||||
if (!this.source) {
|
||||
this.destination = new ReplaySubject();
|
||||
}
|
||||
this._output = new Subject();
|
||||
}
|
||||
multiplex(subMsg, unsubMsg, messageFilter) {
|
||||
const self = this;
|
||||
return new Observable((observer) => {
|
||||
try {
|
||||
self.next(subMsg());
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
const subscription = self.subscribe({
|
||||
next: (x) => {
|
||||
try {
|
||||
if (messageFilter(x)) {
|
||||
observer.next(x);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
},
|
||||
error: (err) => observer.error(err),
|
||||
complete: () => observer.complete(),
|
||||
});
|
||||
return () => {
|
||||
try {
|
||||
self.next(unsubMsg());
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
}
|
||||
_connectSocket() {
|
||||
const { WebSocketCtor, protocol, url, binaryType } = this._config;
|
||||
const observer = this._output;
|
||||
let socket = null;
|
||||
try {
|
||||
socket = protocol ? new WebSocketCtor(url, protocol) : new WebSocketCtor(url);
|
||||
this._socket = socket;
|
||||
if (binaryType) {
|
||||
this._socket.binaryType = binaryType;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
observer.error(e);
|
||||
return;
|
||||
}
|
||||
const subscription = new Subscription(() => {
|
||||
this._socket = null;
|
||||
if (socket && socket.readyState === 1) {
|
||||
socket.close();
|
||||
}
|
||||
});
|
||||
socket.onopen = (evt) => {
|
||||
const { _socket } = this;
|
||||
if (!_socket) {
|
||||
socket.close();
|
||||
this._resetState();
|
||||
return;
|
||||
}
|
||||
const { openObserver } = this._config;
|
||||
if (openObserver) {
|
||||
openObserver.next(evt);
|
||||
}
|
||||
const queue = this.destination;
|
||||
this.destination = Subscriber.create((x) => {
|
||||
if (socket.readyState === 1) {
|
||||
try {
|
||||
const { serializer } = this._config;
|
||||
socket.send(serializer(x));
|
||||
}
|
||||
catch (e) {
|
||||
this.destination.error(e);
|
||||
}
|
||||
}
|
||||
}, (err) => {
|
||||
const { closingObserver } = this._config;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
if (err && err.code) {
|
||||
socket.close(err.code, err.reason);
|
||||
}
|
||||
else {
|
||||
observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));
|
||||
}
|
||||
this._resetState();
|
||||
}, () => {
|
||||
const { closingObserver } = this._config;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
socket.close();
|
||||
this._resetState();
|
||||
});
|
||||
if (queue && queue instanceof ReplaySubject) {
|
||||
subscription.add(queue.subscribe(this.destination));
|
||||
}
|
||||
};
|
||||
socket.onerror = (e) => {
|
||||
this._resetState();
|
||||
observer.error(e);
|
||||
};
|
||||
socket.onclose = (e) => {
|
||||
if (socket === this._socket) {
|
||||
this._resetState();
|
||||
}
|
||||
const { closeObserver } = this._config;
|
||||
if (closeObserver) {
|
||||
closeObserver.next(e);
|
||||
}
|
||||
if (e.wasClean) {
|
||||
observer.complete();
|
||||
}
|
||||
else {
|
||||
observer.error(e);
|
||||
}
|
||||
};
|
||||
socket.onmessage = (e) => {
|
||||
try {
|
||||
const { deserializer } = this._config;
|
||||
observer.next(deserializer(e));
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
};
|
||||
}
|
||||
_subscribe(subscriber) {
|
||||
const { source } = this;
|
||||
if (source) {
|
||||
return source.subscribe(subscriber);
|
||||
}
|
||||
if (!this._socket) {
|
||||
this._connectSocket();
|
||||
}
|
||||
this._output.subscribe(subscriber);
|
||||
subscriber.add(() => {
|
||||
const { _socket } = this;
|
||||
if (this._output.observers.length === 0) {
|
||||
if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {
|
||||
_socket.close();
|
||||
}
|
||||
this._resetState();
|
||||
}
|
||||
});
|
||||
return subscriber;
|
||||
}
|
||||
unsubscribe() {
|
||||
const { _socket } = this;
|
||||
if (_socket && (_socket.readyState === 1 || _socket.readyState === 0)) {
|
||||
_socket.close();
|
||||
}
|
||||
this._resetState();
|
||||
super.unsubscribe();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=WebSocketSubject.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 object-hash contributors
|
||||
|
||||
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.
|
||||
|
||||
@@ -0,0 +1,455 @@
|
||||
/**
|
||||
* The `node:test` module provides a standalone testing module.
|
||||
* @see [source](https://github.com/nodejs/node/blob/v18.x/lib/test.js)
|
||||
*/
|
||||
declare module 'node:test' {
|
||||
/**
|
||||
* Programmatically start the test runner.
|
||||
* @since v18.9.0
|
||||
* @param options Configuration options for running tests.
|
||||
* @returns A {@link TapStream} that emits events about the test execution.
|
||||
*/
|
||||
function run(options?: RunOptions): TapStream;
|
||||
|
||||
/**
|
||||
* The `test()` function is the value imported from the test module. Each invocation of this
|
||||
* function results in the creation of a test point in the TAP output.
|
||||
*
|
||||
* The {@link TestContext} object passed to the fn argument can be used to perform actions
|
||||
* related to the current test. Examples include skipping the test, adding additional TAP
|
||||
* diagnostic information, or creating subtests.
|
||||
*
|
||||
* `test()` returns a {@link Promise} that resolves once the test completes. The return value
|
||||
* can usually be discarded for top level tests. However, the return value from subtests should
|
||||
* be used to prevent the parent test from finishing first and cancelling the subtest as shown
|
||||
* in the following example.
|
||||
*
|
||||
* ```js
|
||||
* test('top level test', async (t) => {
|
||||
* // The setTimeout() in the following subtest would cause it to outlive its
|
||||
* // parent test if 'await' is removed on the next line. Once the parent test
|
||||
* // completes, it will cancel any outstanding subtests.
|
||||
* await t.test('longer running subtest', async (t) => {
|
||||
* return new Promise((resolve, reject) => {
|
||||
* setTimeout(resolve, 1000);
|
||||
* });
|
||||
* });
|
||||
* });
|
||||
* ```
|
||||
* @since v18.0.0
|
||||
* @param name The name of the test, which is displayed when reporting test results.
|
||||
* Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
|
||||
* @param options Configuration options for the test
|
||||
* @param fn The function under test. The first argument to this function is a
|
||||
* {@link TestContext} object. If the test uses callbacks, the callback function is
|
||||
* passed as the second argument. Default: A no-op function.
|
||||
* @returns A {@link Promise} resolved with `undefined` once the test completes.
|
||||
*/
|
||||
function test(name?: string, fn?: TestFn): Promise<void>;
|
||||
function test(name?: string, options?: TestOptions, fn?: TestFn): Promise<void>;
|
||||
function test(options?: TestOptions, fn?: TestFn): Promise<void>;
|
||||
function test(fn?: TestFn): Promise<void>;
|
||||
|
||||
/**
|
||||
* @since v18.6.0
|
||||
* @param name The name of the suite, which is displayed when reporting suite results.
|
||||
* Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
|
||||
* @param options Configuration options for the suite
|
||||
* @param fn The function under suite. Default: A no-op function.
|
||||
*/
|
||||
function describe(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
||||
function describe(name?: string, fn?: SuiteFn): void;
|
||||
function describe(options?: TestOptions, fn?: SuiteFn): void;
|
||||
function describe(fn?: SuiteFn): void;
|
||||
namespace describe {
|
||||
// Shorthand for skipping a suite, same as `describe([name], { skip: true }[, fn])`.
|
||||
function skip(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
||||
function skip(name?: string, fn?: SuiteFn): void;
|
||||
function skip(options?: TestOptions, fn?: SuiteFn): void;
|
||||
function skip(fn?: SuiteFn): void;
|
||||
|
||||
// Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.
|
||||
function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void;
|
||||
function todo(name?: string, fn?: SuiteFn): void;
|
||||
function todo(options?: TestOptions, fn?: SuiteFn): void;
|
||||
function todo(fn?: SuiteFn): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since v18.6.0
|
||||
* @param name The name of the test, which is displayed when reporting test results.
|
||||
* Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
|
||||
* @param options Configuration options for the test
|
||||
* @param fn The function under test. If the test uses callbacks, the callback function is
|
||||
* passed as the second argument. Default: A no-op function.
|
||||
*/
|
||||
function it(name?: string, options?: TestOptions, fn?: ItFn): void;
|
||||
function it(name?: string, fn?: ItFn): void;
|
||||
function it(options?: TestOptions, fn?: ItFn): void;
|
||||
function it(fn?: ItFn): void;
|
||||
namespace it {
|
||||
// Shorthand for skipping a test, same as `it([name], { skip: true }[, fn])`.
|
||||
function skip(name?: string, options?: TestOptions, fn?: ItFn): void;
|
||||
function skip(name?: string, fn?: ItFn): void;
|
||||
function skip(options?: TestOptions, fn?: ItFn): void;
|
||||
function skip(fn?: ItFn): void;
|
||||
|
||||
// Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.
|
||||
function todo(name?: string, options?: TestOptions, fn?: ItFn): void;
|
||||
function todo(name?: string, fn?: ItFn): void;
|
||||
function todo(options?: TestOptions, fn?: ItFn): void;
|
||||
function todo(fn?: ItFn): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* The type of a function under test. The first argument to this function is a
|
||||
* {@link TestContext} object. If the test uses callbacks, the callback function is passed as
|
||||
* the second argument.
|
||||
*/
|
||||
type TestFn = (t: TestContext, done: (result?: any) => void) => any;
|
||||
|
||||
/**
|
||||
* The type of a function under Suite.
|
||||
* If the test uses callbacks, the callback function is passed as an argument
|
||||
*/
|
||||
type SuiteFn = (done: (result?: any) => void) => void;
|
||||
|
||||
/**
|
||||
* The type of a function under test.
|
||||
* If the test uses callbacks, the callback function is passed as an argument
|
||||
*/
|
||||
type ItFn = (done: (result?: any) => void) => any;
|
||||
|
||||
interface RunOptions {
|
||||
/**
|
||||
* If a number is provided, then that many files would run in parallel.
|
||||
* If truthy, it would run (number of cpu cores - 1) files in parallel.
|
||||
* If falsy, it would only run one file at a time.
|
||||
* If unspecified, subtests inherit this value from their parent.
|
||||
* @default true
|
||||
*/
|
||||
concurrency?: number | boolean | undefined;
|
||||
|
||||
/**
|
||||
* An array containing the list of files to run.
|
||||
* If unspecified, the test runner execution model will be used.
|
||||
*/
|
||||
files?: readonly string[] | undefined;
|
||||
|
||||
/**
|
||||
* Allows aborting an in-progress test execution.
|
||||
* @default undefined
|
||||
*/
|
||||
signal?: AbortSignal | undefined;
|
||||
|
||||
/**
|
||||
* A number of milliseconds the test will fail after.
|
||||
* If unspecified, subtests inherit this value from their parent.
|
||||
* @default Infinity
|
||||
*/
|
||||
timeout?: number | undefined;
|
||||
|
||||
/**
|
||||
* Sets inspector port of test child process.
|
||||
* If a nullish value is provided, each process gets its own port,
|
||||
* incremented from the primary's `process.debugPort`.
|
||||
*/
|
||||
inspectPort?: number | (() => number) | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* A successful call of the `run()` method will return a new `TapStream` object,
|
||||
* streaming a [TAP](https://testanything.org/) output.
|
||||
* `TapStream` will emit events in the order of the tests' definitions.
|
||||
* @since v18.9.0
|
||||
*/
|
||||
interface TapStream extends NodeJS.ReadableStream {
|
||||
addListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
addListener(event: string, listener: (...args: any[]) => void): this;
|
||||
emit(event: 'test:diagnostic', message: string): boolean;
|
||||
emit(event: 'test:fail', data: TestFail): boolean;
|
||||
emit(event: 'test:pass', data: TestPass): boolean;
|
||||
emit(event: string | symbol, ...args: any[]): boolean;
|
||||
on(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
on(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
on(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
on(event: string, listener: (...args: any[]) => void): this;
|
||||
once(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
once(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
once(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
once(event: string, listener: (...args: any[]) => void): this;
|
||||
prependListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
prependListener(event: string, listener: (...args: any[]) => void): this;
|
||||
prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this;
|
||||
prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
|
||||
prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
|
||||
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
interface TestFail {
|
||||
/**
|
||||
* The test duration.
|
||||
*/
|
||||
duration: number;
|
||||
|
||||
/**
|
||||
* The failure casing test to fail.
|
||||
*/
|
||||
error: Error;
|
||||
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The ordinal number of the test.
|
||||
*/
|
||||
testNumber: number;
|
||||
|
||||
/**
|
||||
* Present if `context.todo` is called.
|
||||
*/
|
||||
todo?: string;
|
||||
|
||||
/**
|
||||
* Present if `context.skip` is called.
|
||||
*/
|
||||
skip?: string;
|
||||
}
|
||||
|
||||
interface TestPass {
|
||||
/**
|
||||
* The test duration.
|
||||
*/
|
||||
duration: number;
|
||||
|
||||
/**
|
||||
* The test name.
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The ordinal number of the test.
|
||||
*/
|
||||
testNumber: number;
|
||||
|
||||
/**
|
||||
* Present if `context.todo` is called.
|
||||
*/
|
||||
todo?: string;
|
||||
|
||||
/**
|
||||
* Present if `context.skip` is called.
|
||||
*/
|
||||
skip?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* An instance of `TestContext` is passed to each test function in order to interact with the
|
||||
* test runner. However, the `TestContext` constructor is not exposed as part of the API.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
interface TestContext {
|
||||
/**
|
||||
* This function is used to create a hook running before each subtest of the current test.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
beforeEach: typeof beforeEach;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook that runs after the current test finishes.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.13.0
|
||||
*/
|
||||
after: typeof after;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook running after each subtest of the current test.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
afterEach: typeof afterEach;
|
||||
|
||||
/**
|
||||
* This function is used to write TAP diagnostics to the output. Any diagnostic information is
|
||||
* included at the end of the test's results. This function does not return a value.
|
||||
* @param message Message to be displayed as a TAP diagnostic.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
diagnostic(message: string): void;
|
||||
|
||||
/**
|
||||
* The name of the test.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
readonly name: string;
|
||||
|
||||
/**
|
||||
* If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only`
|
||||
* option set. Otherwise, all tests are run. If Node.js was not started with the `--test-only`
|
||||
* command-line option, this function is a no-op.
|
||||
* @param shouldRunOnlyTests Whether or not to run `only` tests.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
runOnly(shouldRunOnlyTests: boolean): void;
|
||||
|
||||
/**
|
||||
* Can be used to abort test subtasks when the test has been aborted.
|
||||
* @since v18.7.0
|
||||
*/
|
||||
readonly signal: AbortSignal;
|
||||
|
||||
/**
|
||||
* This function causes the test's output to indicate the test as skipped. If `message` is
|
||||
* provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
|
||||
* the test function. This function does not return a value.
|
||||
* @param message Optional skip message to be displayed in TAP output.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
skip(message?: string): void;
|
||||
|
||||
/**
|
||||
* This function adds a `TODO` directive to the test's output. If `message` is provided, it is
|
||||
* included in the TAP output. Calling `todo()` does not terminate execution of the test
|
||||
* function. This function does not return a value.
|
||||
* @param message Optional `TODO` message to be displayed in TAP output.
|
||||
* @since v18.0.0
|
||||
*/
|
||||
todo(message?: string): void;
|
||||
|
||||
/**
|
||||
* This function is used to create subtests under the current test. This function behaves in
|
||||
* the same fashion as the top level {@link test} function.
|
||||
* @since v18.0.0
|
||||
* @param name The name of the test, which is displayed when reporting test results.
|
||||
* Default: The `name` property of fn, or `'<anonymous>'` if `fn` does not have a name.
|
||||
* @param options Configuration options for the test
|
||||
* @param fn The function under test. This first argument to this function is a
|
||||
* {@link TestContext} object. If the test uses callbacks, the callback function is
|
||||
* passed as the second argument. Default: A no-op function.
|
||||
* @returns A {@link Promise} resolved with `undefined` once the test completes.
|
||||
*/
|
||||
test: typeof test;
|
||||
}
|
||||
|
||||
interface TestOptions {
|
||||
/**
|
||||
* If a number is provided, then that many tests would run in parallel.
|
||||
* If truthy, it would run (number of cpu cores - 1) tests in parallel.
|
||||
* For subtests, it will be `Infinity` tests in parallel.
|
||||
* If falsy, it would only run one test at a time.
|
||||
* If unspecified, subtests inherit this value from their parent.
|
||||
* @default false
|
||||
*/
|
||||
concurrency?: number | boolean | undefined;
|
||||
|
||||
/**
|
||||
* If truthy, and the test context is configured to run `only` tests, then this test will be
|
||||
* run. Otherwise, the test is skipped.
|
||||
* @default false
|
||||
*/
|
||||
only?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Allows aborting an in-progress test.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
signal?: AbortSignal | undefined;
|
||||
|
||||
/**
|
||||
* If truthy, the test is skipped. If a string is provided, that string is displayed in the
|
||||
* test results as the reason for skipping the test.
|
||||
* @default false
|
||||
*/
|
||||
skip?: boolean | string | undefined;
|
||||
|
||||
/**
|
||||
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
|
||||
* value from their parent.
|
||||
* @default Infinity
|
||||
* @since v18.7.0
|
||||
*/
|
||||
timeout?: number | undefined;
|
||||
|
||||
/**
|
||||
* If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in
|
||||
* the test results as the reason why the test is `TODO`.
|
||||
* @default false
|
||||
*/
|
||||
todo?: boolean | string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to create a hook running before running a suite.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
function before(fn?: HookFn, options?: HookOptions): void;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook running after running a suite.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
function after(fn?: HookFn, options?: HookOptions): void;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook running before each subtest of the current suite.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
function beforeEach(fn?: HookFn, options?: HookOptions): void;
|
||||
|
||||
/**
|
||||
* This function is used to create a hook running after each subtest of the current test.
|
||||
* @param fn The hook function. If the hook uses callbacks, the callback function is passed as
|
||||
* the second argument. Default: A no-op function.
|
||||
* @param options Configuration options for the hook.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
function afterEach(fn?: HookFn, options?: HookOptions): void;
|
||||
|
||||
/**
|
||||
* The hook function. If the hook uses callbacks, the callback function is passed as the
|
||||
* second argument.
|
||||
*/
|
||||
type HookFn = (done: (result?: any) => void) => any;
|
||||
|
||||
/**
|
||||
* Configuration options for hooks.
|
||||
* @since v18.8.0
|
||||
*/
|
||||
interface HookOptions {
|
||||
/**
|
||||
* Allows aborting an in-progress hook.
|
||||
*/
|
||||
signal?: AbortSignal | undefined;
|
||||
|
||||
/**
|
||||
* A number of milliseconds the hook will fail after. If unspecified, subtests inherit this
|
||||
* value from their parent.
|
||||
* @default Infinity
|
||||
*/
|
||||
timeout?: number | undefined;
|
||||
}
|
||||
|
||||
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach };
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"IsSanctionedSimpleUnitIdentifier.d.ts","sourceRoot":"","sources":["../../../../../packages/ecma402-abstract/IsSanctionedSimpleUnitIdentifier.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,gBAAgB,UA4C5B,CAAA;AAID,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,UAE/C;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,UAA4C,CAAA;AAErE;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,cAAc,EAAE,MAAM,WAEtE"}
|
||||
@@ -0,0 +1 @@
|
||||
export declare function joinPathSegments(a: string, b: string, separator: string): string;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J D E F A B CC"},B:{"1":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H","2":"C K L","260":"G M N O"},C:{"1":"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","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 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","129":"FB"},D:{"1":"MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"1":"C K L G qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v J D E F A B HC zB IC JC KC LC 0B"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e","2":"0 1 2 3 4 5 6 7 8 F B C G M N O w g x y z PC QC RC SC qB AC TC rB"},G:{"1":"eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"E zB UC BC VC WC XC YC ZC aC bC cC dC"},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:{"16":"H"},N:{"2":"A B"},O:{"1":"vC"},P:{"1":"g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C","2":"I"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:5,C:"Resource Hints: preconnect"};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"debounceTime.js","sourceRoot":"","sources":["../../../../src/internal/operators/debounceTime.ts"],"names":[],"mappings":";;;AAAA,4CAAoD;AAGpD,qCAAuC;AACvC,2DAAgE;AA2DhE,SAAgB,YAAY,CAAI,OAAe,EAAE,SAAyC;IAAzC,0BAAA,EAAA,YAA2B,sBAAc;IACxF,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,UAAU,GAAwB,IAAI,CAAC;QAC3C,IAAI,SAAS,GAAa,IAAI,CAAC;QAC/B,IAAI,QAAQ,GAAkB,IAAI,CAAC;QAEnC,IAAM,IAAI,GAAG;YACX,IAAI,UAAU,EAAE;gBAEd,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,UAAU,GAAG,IAAI,CAAC;gBAClB,IAAM,KAAK,GAAG,SAAU,CAAC;gBACzB,SAAS,GAAG,IAAI,CAAC;gBACjB,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aACxB;QACH,CAAC,CAAC;QACF,SAAS,YAAY;YAInB,IAAM,UAAU,GAAG,QAAS,GAAG,OAAO,CAAC;YACvC,IAAM,GAAG,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAC5B,IAAI,GAAG,GAAG,UAAU,EAAE;gBAEpB,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,UAAU,GAAG,GAAG,CAAC,CAAC;gBACxD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBAC3B,OAAO;aACR;YAED,IAAI,EAAE,CAAC;QACT,CAAC;QAED,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;YACP,SAAS,GAAG,KAAK,CAAC;YAClB,QAAQ,GAAG,SAAS,CAAC,GAAG,EAAE,CAAC;YAG3B,IAAI,CAAC,UAAU,EAAE;gBACf,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;gBACvD,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;aAC5B;QACH,CAAC,EACD;YAGE,IAAI,EAAE,CAAC;YACP,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EAED,SAAS,EACT;YAEE,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;QAChC,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA5DD,oCA4DC"}
|
||||
@@ -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","322":"P Q R S T","578":"U V"},C:{"1":"X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z 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 EC FC","194":"kB h lB mB nB oB pB P Q R wB S T U V W"},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 cB dB eB fB gB hB iB jB kB h lB mB nB oB pB","322":"P Q R S T","578":"U V"},E:{"2":"I v J D E F A B C K HC zB IC JC KC LC 0B qB rB 1B","1090":"L G 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 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB PC QC RC SC qB AC TC rB","578":"h"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC","66":"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:{"1":"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:6,C:"HTTP/3 protocol"};
|
||||
@@ -0,0 +1,13 @@
|
||||
import { operate } from '../util/lift';
|
||||
import { createOperatorSubscriber } from './OperatorSubscriber';
|
||||
export function takeWhile(predicate, inclusive = false) {
|
||||
return operate((source, subscriber) => {
|
||||
let index = 0;
|
||||
source.subscribe(createOperatorSubscriber(subscriber, (value) => {
|
||||
const result = predicate(value, index++);
|
||||
(result || inclusive) && subscriber.next(value);
|
||||
!result && subscriber.complete();
|
||||
}));
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=takeWhile.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,27 @@
|
||||
# Map
|
||||
|
||||
_Map_ instance
|
||||
|
||||
## `map/is`
|
||||
|
||||
Confirms if given object is a native _map_
|
||||
|
||||
```javascript
|
||||
const isMap = require("type/map/is");
|
||||
|
||||
isMap(new Map()); // true
|
||||
isMap(new Set()); // false
|
||||
isMap({}); // false
|
||||
```
|
||||
|
||||
## `map/ensure`
|
||||
|
||||
If given argument is a _map_, it is returned back. Otherwise `TypeError` is thrown.
|
||||
|
||||
```javascript
|
||||
const ensureMap = require("type/map/ensure");
|
||||
|
||||
const map = new Map();
|
||||
ensureMap(map); // map
|
||||
eensureMap({}); // Thrown TypeError: [object Object] is not a map
|
||||
```
|
||||
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
var inspect = require('../');
|
||||
var test = require('tape');
|
||||
|
||||
test('quoteStyle option', function (t) {
|
||||
t['throws'](function () { inspect(null, { quoteStyle: false }); }, 'false is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: true }); }, 'true is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: '' }); }, '"" is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: {} }); }, '{} is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: [] }); }, '[] is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: 42 }); }, '42 is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: NaN }); }, 'NaN is not a valid value');
|
||||
t['throws'](function () { inspect(null, { quoteStyle: function () {} }); }, 'a function is not a valid value');
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
var isUtf8 = require('is-utf8');
|
||||
|
||||
module.exports = function (x) {
|
||||
// Catches EFBBBF (UTF-8 BOM) because the buffer-to-string
|
||||
// conversion translates it to FEFF (UTF-16 BOM)
|
||||
if (typeof x === 'string' && x.charCodeAt(0) === 0xFEFF) {
|
||||
return x.slice(1);
|
||||
}
|
||||
|
||||
if (Buffer.isBuffer(x) && isUtf8(x) &&
|
||||
x[0] === 0xEF && x[1] === 0xBB && x[2] === 0xBF) {
|
||||
return x.slice(3);
|
||||
}
|
||||
|
||||
return x;
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"exhaust.d.ts","sourceRoot":"","sources":["../../../../src/internal/operators/exhaust.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,eAAO,MAAM,OAAO,mBAAa,CAAC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pluck.js","sourceRoot":"","sources":["../../../../src/internal/operators/pluck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAwF5B,MAAM,UAAU,KAAK;IAAO,oBAA8C;SAA9C,UAA8C,EAA9C,qBAA8C,EAA9C,IAA8C;QAA9C,+BAA8C;;IACxE,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IACjC,IAAI,MAAM,KAAK,CAAC,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;KACxD;IACD,OAAO,GAAG,CAAC,UAAC,CAAC;QACX,IAAI,WAAW,GAAQ,CAAC,CAAC;QACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAC/B,IAAM,CAAC,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACvC,IAAI,OAAO,CAAC,KAAK,WAAW,EAAE;gBAC5B,WAAW,GAAG,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF;QACD,OAAO,WAAW,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
||||
@@ -0,0 +1,103 @@
|
||||
# package-json
|
||||
|
||||
> Get metadata of a package from the npm registry
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install package-json
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import packageJson from 'package-json';
|
||||
|
||||
console.log(await packageJson('ava'));
|
||||
//=> {name: 'ava', …}
|
||||
|
||||
// Also works with scoped packages
|
||||
console.log(await packageJson('@sindresorhus/df'));
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### packageJson(packageName, options?)
|
||||
|
||||
#### packageName
|
||||
|
||||
Type: `string`
|
||||
|
||||
Name of the package.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### version
|
||||
|
||||
Type: `string`\
|
||||
Default: `latest`
|
||||
|
||||
Package version such as `1.0.0` or a [dist tag](https://docs.npmjs.com/cli/dist-tag) such as `latest`.
|
||||
|
||||
The version can also be in any format supported by the [semver](https://github.com/npm/node-semver) module. For example:
|
||||
|
||||
- `1` - Get the latest `1.x.x`
|
||||
- `1.2` - Get the latest `1.2.x`
|
||||
- `^1.2.3` - Get the latest `1.x.x` but at least `1.2.3`
|
||||
- `~1.2.3` - Get the latest `1.2.x` but at least `1.2.3`
|
||||
|
||||
##### fullMetadata
|
||||
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
By default, only an abbreviated metadata object is returned for performance reasons. [Read more.](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md)
|
||||
|
||||
##### allVersions
|
||||
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
Return the [main entry](https://registry.npmjs.org/ava) containing all versions.
|
||||
|
||||
##### registryUrl
|
||||
|
||||
Type: `string`\
|
||||
Default: Auto-detected
|
||||
|
||||
The registry URL is by default inferred from the npm defaults and `.npmrc`. This is beneficial as `package-json` and any project using it will work just like npm. This option is **only** intended for internal tools. You should **not** use this option in reusable packages. Prefer just using `.npmrc` whenever possible.
|
||||
|
||||
##### agent
|
||||
|
||||
Type: `object`
|
||||
|
||||
Overwrite the `agent` option that is passed down to [`got`](https://github.com/sindresorhus/got#agent). This might be useful to add [proxy support](https://github.com/sindresorhus/got#proxies).
|
||||
|
||||
### PackageNotFoundError
|
||||
|
||||
The error thrown when the given package name cannot be found.
|
||||
|
||||
### VersionNotFoundError
|
||||
|
||||
The error thrown when the given package version cannot be found.
|
||||
|
||||
## Authentication
|
||||
|
||||
Both public and private registries are supported, for both scoped and unscoped packages, as long as the registry uses either bearer tokens or basic authentication.
|
||||
|
||||
## package-json for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of package-json and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-package-json?utm_source=npm-package-json&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
## Related
|
||||
|
||||
- [package-json-cli](https://github.com/sindresorhus/package-json-cli) - CLI for this module
|
||||
- [latest-version](https://github.com/sindresorhus/latest-version) - Get the latest version of an npm package
|
||||
- [pkg-versions](https://github.com/sindresorhus/pkg-versions) - Get the version numbers of a package from the npm registry
|
||||
- [npm-keyword](https://github.com/sindresorhus/npm-keyword) - Get a list of npm packages with a certain keyword
|
||||
- [npm-user](https://github.com/sindresorhus/npm-user) - Get user info of an npm user
|
||||
- [npm-email](https://github.com/sindresorhus/npm-email) - Get the email of an npm user
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"mimic-response","version":"4.0.0","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"readme.md":{"checkedAt":1678883671053,"integrity":"sha512-Dojrwiz6uXJNdgDh2gvwsQS7t3pWpr4TNgF06WWLM9bvWfhB6Z3B6RI7HCZSyZ2nV7pLdVkQ6aTgIaRglKUqig==","mode":420,"size":1843},"index.d.ts":{"checkedAt":1678883671053,"integrity":"sha512-rjT42byiaGSC1K1glYWkVJtbv8RjMkwxKfhkO+QL6xE3ScQ9inqhLOW/YBjiQX/nTVEF9EUSuMstWMqzSiLz0Q==","mode":420,"size":813},"index.js":{"checkedAt":1678883671053,"integrity":"sha512-YkCLhLOB2qWEPgWlI8plyGvfmozoSyEQ8dPIbi55odbMjtrzZ/xo9ebzb4gz2DfUJz0taUc1Lp7HHMQgOsj0QA==","mode":420,"size":1585},"package.json":{"checkedAt":1678883671053,"integrity":"sha512-PlmzRgZxV+5EiCi2sVzYgXryMIoIXd5+DO/7SaSsQRfvD6HXThWU8Ir2b3+2nGMmK8EwNTQ4tPO3uH4CSHVwqw==","mode":420,"size":843}}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"root": true,
|
||||
|
||||
"extends": "@ljharb",
|
||||
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
},
|
||||
|
||||
"rules": {
|
||||
"id-length": "off",
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
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.
|
||||
@@ -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.00766,"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,"89":0.00383,"90":0,"91":0.00766,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0.08047,"99":0.00383,"100":0.00383,"101":0,"102":0.00383,"103":0,"104":0,"105":0,"106":0,"107":0.00766,"108":0.00766,"109":0.33338,"110":0.22609,"111":0.00383,"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.01916,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0.0115,"51":0,"52":0,"53":0,"54":0,"55":0.00383,"56":0.00383,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0.00383,"65":0,"66":0,"67":0,"68":0,"69":0.02299,"70":0.01533,"71":0.00383,"72":0.01533,"73":0,"74":0.03449,"75":0,"76":0,"77":0,"78":0.01916,"79":0.00383,"80":0.00766,"81":0.14562,"83":0.00766,"84":0,"85":0.00383,"86":0.00383,"87":0.03832,"88":0.00383,"89":0.00383,"90":0.00766,"91":0.00766,"92":0.00383,"93":0.00383,"94":0.0115,"95":0.0115,"96":0.00766,"97":0.00383,"98":0.03449,"99":0.00383,"100":0.00383,"101":0.00383,"102":0.01916,"103":0.03449,"104":0.02682,"105":0.03066,"106":0.06131,"107":0.0115,"108":0.09963,"109":3.16523,"110":1.93899,"111":0.00383,"112":0.00383,"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.00383,"27":0,"28":0.00766,"29":0,"30":0,"31":0,"32":0.00383,"33":0.00766,"34":0,"35":0.01533,"36":0,"37":0.01533,"38":0.00766,"39":0,"40":0,"41":0,"42":0.00383,"43":0,"44":0,"45":0,"46":0.02299,"47":0,"48":0,"49":0,"50":0,"51":0.00766,"52":0,"53":0,"54":0,"55":0.00383,"56":0.00383,"57":0.00383,"58":0.02299,"60":0.05748,"62":0,"63":0.20693,"64":0.05365,"65":0.05365,"66":0.0843,"67":0.2874,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0.00383,"80":0.00383,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0.0115,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0.14945,"95":0.26824,"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.00766},B:{"12":0.00383,"13":0.00383,"14":0.00383,"15":0.00383,"16":0,"17":0,"18":0.0115,"79":0,"80":0,"81":0,"83":0,"84":0.00383,"85":0,"86":0,"87":0,"88":0,"89":0.0115,"90":0.00383,"91":0.00383,"92":0.03449,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0.00383,"101":0,"102":0.00383,"103":0,"104":0,"105":0.00383,"106":0.0115,"107":0.00766,"108":0.02682,"109":0.41769,"110":0.59396},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,_:"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,"13.1":0.02682,"14.1":0.00383,"15.1":0,"15.2-15.3":0.00383,"15.4":0.00766,"15.5":0.00383,"15.6":0.0115,"16.0":0,"16.1":0.00766,"16.2":0.01533,"16.3":0.0115,"16.4":0},G:{"8":0.04983,"3.2":0,"4.0-4.1":0,"4.2-4.3":0,"5.0-5.1":0.00634,"6.0-6.1":0,"7.0-7.1":0.02174,"8.1-8.4":0.00362,"9.0-9.2":0,"9.3":0.08244,"10.0-10.2":0,"10.3":0.38321,"11.0-11.2":0.00272,"11.3-11.4":0.00181,"12.0-12.1":0.01902,"12.2-12.5":1.87893,"13.0-13.1":0.10781,"13.2":0.00544,"13.3":0.10871,"13.4-13.7":0.23464,"14.0-14.4":0.59249,"14.5-14.8":0.55987,"15.0-15.1":0.14133,"15.2-15.3":0.31436,"15.4":0.27541,"15.5":0.45841,"15.6":0.47471,"16.0":0.42398,"16.1":0.69486,"16.2":0.79542,"16.3":0.71298,"16.4":0.00181},P:{"4":0.43133,"20":0.15405,"5.0-5.4":0,"6.2-6.4":0.02054,"7.2-7.4":0.16432,"8.2":0,"9.2":0.48268,"10.1":0,"11.1-11.2":0.05135,"12.0":0.02054,"13.0":0.03081,"14.0":0.05135,"15.0":0.01027,"16.0":0.06162,"17.0":0.08216,"18.0":0.04108,"19.0":0.45187},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0.00049,"4.2-4.3":0.00146,"4.4":0,"4.4.3-4.4.4":0.03955},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0,"11":0.0115,"5.5":0},N:{"10":0,"11":0},S:{"2.5":1.02389,_:"3.0-3.1"},J:{"7":0,"10":0.00617},O:{"0":0.40092},H:{"0":5.16209},L:{"0":70.50522},R:{_:"0"},M:{"0":0.26522},Q:{"13.1":0.00617}};
|
||||
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
|
||||
var resolveException = require("../lib/resolve-exception")
|
||||
, is = require("./is");
|
||||
|
||||
module.exports = function (value/*, options*/) {
|
||||
if (is(value)) return value;
|
||||
var options = arguments[1];
|
||||
var errorMessage =
|
||||
options && options.name
|
||||
? "Expected a thenable for %n, received %v"
|
||||
: "%v is not a thenable";
|
||||
return resolveException(value, errorMessage, options);
|
||||
};
|
||||
@@ -0,0 +1,100 @@
|
||||
# mime-db
|
||||
|
||||
[![NPM Version][npm-version-image]][npm-url]
|
||||
[![NPM Downloads][npm-downloads-image]][npm-url]
|
||||
[![Node.js Version][node-image]][node-url]
|
||||
[![Build Status][ci-image]][ci-url]
|
||||
[![Coverage Status][coveralls-image]][coveralls-url]
|
||||
|
||||
This is a large database of mime types and information about them.
|
||||
It consists of a single, public JSON file and does not include any logic,
|
||||
allowing it to remain as un-opinionated as possible with an API.
|
||||
It aggregates data from the following sources:
|
||||
|
||||
- http://www.iana.org/assignments/media-types/media-types.xhtml
|
||||
- http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
||||
- http://hg.nginx.org/nginx/raw-file/default/conf/mime.types
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install mime-db
|
||||
```
|
||||
|
||||
### Database Download
|
||||
|
||||
If you're crazy enough to use this in the browser, you can just grab the
|
||||
JSON file using [jsDelivr](https://www.jsdelivr.com/). It is recommended to
|
||||
replace `master` with [a release tag](https://github.com/jshttp/mime-db/tags)
|
||||
as the JSON format may change in the future.
|
||||
|
||||
```
|
||||
https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var db = require('mime-db')
|
||||
|
||||
// grab data on .js files
|
||||
var data = db['application/javascript']
|
||||
```
|
||||
|
||||
## Data Structure
|
||||
|
||||
The JSON file is a map lookup for lowercased mime types.
|
||||
Each mime type has the following properties:
|
||||
|
||||
- `.source` - where the mime type is defined.
|
||||
If not set, it's probably a custom media type.
|
||||
- `apache` - [Apache common media types](http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
|
||||
- `iana` - [IANA-defined media types](http://www.iana.org/assignments/media-types/media-types.xhtml)
|
||||
- `nginx` - [nginx media types](http://hg.nginx.org/nginx/raw-file/default/conf/mime.types)
|
||||
- `.extensions[]` - known extensions associated with this mime type.
|
||||
- `.compressible` - whether a file of this type can be gzipped.
|
||||
- `.charset` - the default charset associated with this type, if any.
|
||||
|
||||
If unknown, every property could be `undefined`.
|
||||
|
||||
## Contributing
|
||||
|
||||
To edit the database, only make PRs against `src/custom-types.json` or
|
||||
`src/custom-suffix.json`.
|
||||
|
||||
The `src/custom-types.json` file is a JSON object with the MIME type as the
|
||||
keys and the values being an object with the following keys:
|
||||
|
||||
- `compressible` - leave out if you don't know, otherwise `true`/`false` to
|
||||
indicate whether the data represented by the type is typically compressible.
|
||||
- `extensions` - include an array of file extensions that are associated with
|
||||
the type.
|
||||
- `notes` - human-readable notes about the type, typically what the type is.
|
||||
- `sources` - include an array of URLs of where the MIME type and the associated
|
||||
extensions are sourced from. This needs to be a [primary source](https://en.wikipedia.org/wiki/Primary_source);
|
||||
links to type aggregating sites and Wikipedia are _not acceptable_.
|
||||
|
||||
To update the build, run `npm run build`.
|
||||
|
||||
### Adding Custom Media Types
|
||||
|
||||
The best way to get new media types included in this library is to register
|
||||
them with the IANA. The community registration procedure is outlined in
|
||||
[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
|
||||
registered with the IANA are automatically pulled into this library.
|
||||
|
||||
If that is not possible / feasible, they can be added directly here as a
|
||||
"custom" type. To do this, it is required to have a primary source that
|
||||
definitively lists the media type. If an extension is going to be listed as
|
||||
associateed with this media type, the source must definitively link the
|
||||
media type and extension as well.
|
||||
|
||||
[ci-image]: https://badgen.net/github/checks/jshttp/mime-db/master?label=ci
|
||||
[ci-url]: https://github.com/jshttp/mime-db/actions?query=workflow%3Aci
|
||||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/mime-db/master
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/mime-db?branch=master
|
||||
[node-image]: https://badgen.net/npm/node/mime-db
|
||||
[node-url]: https://nodejs.org/en/download
|
||||
[npm-downloads-image]: https://badgen.net/npm/dm/mime-db
|
||||
[npm-url]: https://npmjs.org/package/mime-db
|
||||
[npm-version-image]: https://badgen.net/npm/v/mime-db
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"Commands:": "Parancsok:",
|
||||
"Options:": "Opciók:",
|
||||
"Examples:": "Példák:",
|
||||
"boolean": "boolean",
|
||||
"count": "számláló",
|
||||
"string": "szöveg",
|
||||
"number": "szám",
|
||||
"array": "tömb",
|
||||
"required": "kötelező",
|
||||
"default": "alapértelmezett",
|
||||
"default:": "alapértelmezett:",
|
||||
"choices:": "lehetőségek:",
|
||||
"aliases:": "aliaszok:",
|
||||
"generated-value": "generált-érték",
|
||||
"Not enough non-option arguments: got %s, need at least %s": {
|
||||
"one": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell",
|
||||
"other": "Nincs elég nem opcionális argumentum: %s van, legalább %s kell"
|
||||
},
|
||||
"Too many non-option arguments: got %s, maximum of %s": {
|
||||
"one": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet",
|
||||
"other": "Túl sok nem opciánlis argumentum van: %s van, maximum %s lehet"
|
||||
},
|
||||
"Missing argument value: %s": {
|
||||
"one": "Hiányzó argumentum érték: %s",
|
||||
"other": "Hiányzó argumentum értékek: %s"
|
||||
},
|
||||
"Missing required argument: %s": {
|
||||
"one": "Hiányzó kötelező argumentum: %s",
|
||||
"other": "Hiányzó kötelező argumentumok: %s"
|
||||
},
|
||||
"Unknown argument: %s": {
|
||||
"one": "Ismeretlen argumentum: %s",
|
||||
"other": "Ismeretlen argumentumok: %s"
|
||||
},
|
||||
"Invalid values:": "Érvénytelen érték:",
|
||||
"Argument: %s, Given: %s, Choices: %s": "Argumentum: %s, Megadott: %s, Lehetőségek: %s",
|
||||
"Argument check failed: %s": "Argumentum ellenőrzés sikertelen: %s",
|
||||
"Implications failed:": "Implikációk sikertelenek:",
|
||||
"Not enough arguments following: %s": "Nem elég argumentum követi: %s",
|
||||
"Invalid JSON config file: %s": "Érvénytelen JSON konfigurációs file: %s",
|
||||
"Path to JSON config file": "JSON konfigurációs file helye",
|
||||
"Show help": "Súgo megjelenítése",
|
||||
"Show version number": "Verziószám megjelenítése",
|
||||
"Did you mean %s?": "Erre gondoltál %s?"
|
||||
}
|
||||
@@ -0,0 +1,790 @@
|
||||
// Approach:
|
||||
//
|
||||
// 1. Get the minimatch set
|
||||
// 2. For each pattern in the set, PROCESS(pattern, false)
|
||||
// 3. Store matches per-set, then uniq them
|
||||
//
|
||||
// PROCESS(pattern, inGlobStar)
|
||||
// Get the first [n] items from pattern that are all strings
|
||||
// Join these together. This is PREFIX.
|
||||
// If there is no more remaining, then stat(PREFIX) and
|
||||
// add to matches if it succeeds. END.
|
||||
//
|
||||
// If inGlobStar and PREFIX is symlink and points to dir
|
||||
// set ENTRIES = []
|
||||
// else readdir(PREFIX) as ENTRIES
|
||||
// If fail, END
|
||||
//
|
||||
// with ENTRIES
|
||||
// If pattern[n] is GLOBSTAR
|
||||
// // handle the case where the globstar match is empty
|
||||
// // by pruning it out, and testing the resulting pattern
|
||||
// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)
|
||||
// // handle other cases.
|
||||
// for ENTRY in ENTRIES (not dotfiles)
|
||||
// // attach globstar + tail onto the entry
|
||||
// // Mark that this entry is a globstar match
|
||||
// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)
|
||||
//
|
||||
// else // not globstar
|
||||
// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)
|
||||
// Test ENTRY against pattern[n]
|
||||
// If fails, continue
|
||||
// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])
|
||||
//
|
||||
// Caveat:
|
||||
// Cache all stats and readdirs results to minimize syscall. Since all
|
||||
// we ever care about is existence and directory-ness, we can just keep
|
||||
// `true` for files, and [children,...] for directories, or `false` for
|
||||
// things that don't exist.
|
||||
|
||||
module.exports = glob
|
||||
|
||||
var rp = require('fs.realpath')
|
||||
var minimatch = require('minimatch')
|
||||
var Minimatch = minimatch.Minimatch
|
||||
var inherits = require('inherits')
|
||||
var EE = require('events').EventEmitter
|
||||
var path = require('path')
|
||||
var assert = require('assert')
|
||||
var isAbsolute = require('path-is-absolute')
|
||||
var globSync = require('./sync.js')
|
||||
var common = require('./common.js')
|
||||
var setopts = common.setopts
|
||||
var ownProp = common.ownProp
|
||||
var inflight = require('inflight')
|
||||
var util = require('util')
|
||||
var childrenIgnored = common.childrenIgnored
|
||||
var isIgnored = common.isIgnored
|
||||
|
||||
var once = require('once')
|
||||
|
||||
function glob (pattern, options, cb) {
|
||||
if (typeof options === 'function') cb = options, options = {}
|
||||
if (!options) options = {}
|
||||
|
||||
if (options.sync) {
|
||||
if (cb)
|
||||
throw new TypeError('callback provided to sync glob')
|
||||
return globSync(pattern, options)
|
||||
}
|
||||
|
||||
return new Glob(pattern, options, cb)
|
||||
}
|
||||
|
||||
glob.sync = globSync
|
||||
var GlobSync = glob.GlobSync = globSync.GlobSync
|
||||
|
||||
// old api surface
|
||||
glob.glob = glob
|
||||
|
||||
function extend (origin, add) {
|
||||
if (add === null || typeof add !== 'object') {
|
||||
return origin
|
||||
}
|
||||
|
||||
var keys = Object.keys(add)
|
||||
var i = keys.length
|
||||
while (i--) {
|
||||
origin[keys[i]] = add[keys[i]]
|
||||
}
|
||||
return origin
|
||||
}
|
||||
|
||||
glob.hasMagic = function (pattern, options_) {
|
||||
var options = extend({}, options_)
|
||||
options.noprocess = true
|
||||
|
||||
var g = new Glob(pattern, options)
|
||||
var set = g.minimatch.set
|
||||
|
||||
if (!pattern)
|
||||
return false
|
||||
|
||||
if (set.length > 1)
|
||||
return true
|
||||
|
||||
for (var j = 0; j < set[0].length; j++) {
|
||||
if (typeof set[0][j] !== 'string')
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
glob.Glob = Glob
|
||||
inherits(Glob, EE)
|
||||
function Glob (pattern, options, cb) {
|
||||
if (typeof options === 'function') {
|
||||
cb = options
|
||||
options = null
|
||||
}
|
||||
|
||||
if (options && options.sync) {
|
||||
if (cb)
|
||||
throw new TypeError('callback provided to sync glob')
|
||||
return new GlobSync(pattern, options)
|
||||
}
|
||||
|
||||
if (!(this instanceof Glob))
|
||||
return new Glob(pattern, options, cb)
|
||||
|
||||
setopts(this, pattern, options)
|
||||
this._didRealPath = false
|
||||
|
||||
// process each pattern in the minimatch set
|
||||
var n = this.minimatch.set.length
|
||||
|
||||
// The matches are stored as {<filename>: true,...} so that
|
||||
// duplicates are automagically pruned.
|
||||
// Later, we do an Object.keys() on these.
|
||||
// Keep them as a list so we can fill in when nonull is set.
|
||||
this.matches = new Array(n)
|
||||
|
||||
if (typeof cb === 'function') {
|
||||
cb = once(cb)
|
||||
this.on('error', cb)
|
||||
this.on('end', function (matches) {
|
||||
cb(null, matches)
|
||||
})
|
||||
}
|
||||
|
||||
var self = this
|
||||
this._processing = 0
|
||||
|
||||
this._emitQueue = []
|
||||
this._processQueue = []
|
||||
this.paused = false
|
||||
|
||||
if (this.noprocess)
|
||||
return this
|
||||
|
||||
if (n === 0)
|
||||
return done()
|
||||
|
||||
var sync = true
|
||||
for (var i = 0; i < n; i ++) {
|
||||
this._process(this.minimatch.set[i], i, false, done)
|
||||
}
|
||||
sync = false
|
||||
|
||||
function done () {
|
||||
--self._processing
|
||||
if (self._processing <= 0) {
|
||||
if (sync) {
|
||||
process.nextTick(function () {
|
||||
self._finish()
|
||||
})
|
||||
} else {
|
||||
self._finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._finish = function () {
|
||||
assert(this instanceof Glob)
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
if (this.realpath && !this._didRealpath)
|
||||
return this._realpath()
|
||||
|
||||
common.finish(this)
|
||||
this.emit('end', this.found)
|
||||
}
|
||||
|
||||
Glob.prototype._realpath = function () {
|
||||
if (this._didRealpath)
|
||||
return
|
||||
|
||||
this._didRealpath = true
|
||||
|
||||
var n = this.matches.length
|
||||
if (n === 0)
|
||||
return this._finish()
|
||||
|
||||
var self = this
|
||||
for (var i = 0; i < this.matches.length; i++)
|
||||
this._realpathSet(i, next)
|
||||
|
||||
function next () {
|
||||
if (--n === 0)
|
||||
self._finish()
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._realpathSet = function (index, cb) {
|
||||
var matchset = this.matches[index]
|
||||
if (!matchset)
|
||||
return cb()
|
||||
|
||||
var found = Object.keys(matchset)
|
||||
var self = this
|
||||
var n = found.length
|
||||
|
||||
if (n === 0)
|
||||
return cb()
|
||||
|
||||
var set = this.matches[index] = Object.create(null)
|
||||
found.forEach(function (p, i) {
|
||||
// If there's a problem with the stat, then it means that
|
||||
// one or more of the links in the realpath couldn't be
|
||||
// resolved. just return the abs value in that case.
|
||||
p = self._makeAbs(p)
|
||||
rp.realpath(p, self.realpathCache, function (er, real) {
|
||||
if (!er)
|
||||
set[real] = true
|
||||
else if (er.syscall === 'stat')
|
||||
set[p] = true
|
||||
else
|
||||
self.emit('error', er) // srsly wtf right here
|
||||
|
||||
if (--n === 0) {
|
||||
self.matches[index] = set
|
||||
cb()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Glob.prototype._mark = function (p) {
|
||||
return common.mark(this, p)
|
||||
}
|
||||
|
||||
Glob.prototype._makeAbs = function (f) {
|
||||
return common.makeAbs(this, f)
|
||||
}
|
||||
|
||||
Glob.prototype.abort = function () {
|
||||
this.aborted = true
|
||||
this.emit('abort')
|
||||
}
|
||||
|
||||
Glob.prototype.pause = function () {
|
||||
if (!this.paused) {
|
||||
this.paused = true
|
||||
this.emit('pause')
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype.resume = function () {
|
||||
if (this.paused) {
|
||||
this.emit('resume')
|
||||
this.paused = false
|
||||
if (this._emitQueue.length) {
|
||||
var eq = this._emitQueue.slice(0)
|
||||
this._emitQueue.length = 0
|
||||
for (var i = 0; i < eq.length; i ++) {
|
||||
var e = eq[i]
|
||||
this._emitMatch(e[0], e[1])
|
||||
}
|
||||
}
|
||||
if (this._processQueue.length) {
|
||||
var pq = this._processQueue.slice(0)
|
||||
this._processQueue.length = 0
|
||||
for (var i = 0; i < pq.length; i ++) {
|
||||
var p = pq[i]
|
||||
this._processing--
|
||||
this._process(p[0], p[1], p[2], p[3])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
|
||||
assert(this instanceof Glob)
|
||||
assert(typeof cb === 'function')
|
||||
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
this._processing++
|
||||
if (this.paused) {
|
||||
this._processQueue.push([pattern, index, inGlobStar, cb])
|
||||
return
|
||||
}
|
||||
|
||||
//console.error('PROCESS %d', this._processing, pattern)
|
||||
|
||||
// Get the first [n] parts of pattern that are all strings.
|
||||
var n = 0
|
||||
while (typeof pattern[n] === 'string') {
|
||||
n ++
|
||||
}
|
||||
// now n is the index of the first one that is *not* a string.
|
||||
|
||||
// see if there's anything else
|
||||
var prefix
|
||||
switch (n) {
|
||||
// if not, then this is rather simple
|
||||
case pattern.length:
|
||||
this._processSimple(pattern.join('/'), index, cb)
|
||||
return
|
||||
|
||||
case 0:
|
||||
// pattern *starts* with some non-trivial item.
|
||||
// going to readdir(cwd), but not include the prefix in matches.
|
||||
prefix = null
|
||||
break
|
||||
|
||||
default:
|
||||
// pattern has some string bits in the front.
|
||||
// whatever it starts with, whether that's 'absolute' like /foo/bar,
|
||||
// or 'relative' like '../baz'
|
||||
prefix = pattern.slice(0, n).join('/')
|
||||
break
|
||||
}
|
||||
|
||||
var remain = pattern.slice(n)
|
||||
|
||||
// get the list of entries.
|
||||
var read
|
||||
if (prefix === null)
|
||||
read = '.'
|
||||
else if (isAbsolute(prefix) ||
|
||||
isAbsolute(pattern.map(function (p) {
|
||||
return typeof p === 'string' ? p : '[*]'
|
||||
}).join('/'))) {
|
||||
if (!prefix || !isAbsolute(prefix))
|
||||
prefix = '/' + prefix
|
||||
read = prefix
|
||||
} else
|
||||
read = prefix
|
||||
|
||||
var abs = this._makeAbs(read)
|
||||
|
||||
//if ignored, skip _processing
|
||||
if (childrenIgnored(this, read))
|
||||
return cb()
|
||||
|
||||
var isGlobStar = remain[0] === minimatch.GLOBSTAR
|
||||
if (isGlobStar)
|
||||
this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)
|
||||
else
|
||||
this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)
|
||||
}
|
||||
|
||||
Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {
|
||||
var self = this
|
||||
this._readdir(abs, inGlobStar, function (er, entries) {
|
||||
return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
|
||||
})
|
||||
}
|
||||
|
||||
Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
||||
|
||||
// if the abs isn't a dir, then nothing can match!
|
||||
if (!entries)
|
||||
return cb()
|
||||
|
||||
// It will only match dot entries if it starts with a dot, or if
|
||||
// dot is set. Stuff like @(.foo|.bar) isn't allowed.
|
||||
var pn = remain[0]
|
||||
var negate = !!this.minimatch.negate
|
||||
var rawGlob = pn._glob
|
||||
var dotOk = this.dot || rawGlob.charAt(0) === '.'
|
||||
|
||||
var matchedEntries = []
|
||||
for (var i = 0; i < entries.length; i++) {
|
||||
var e = entries[i]
|
||||
if (e.charAt(0) !== '.' || dotOk) {
|
||||
var m
|
||||
if (negate && !prefix) {
|
||||
m = !e.match(pn)
|
||||
} else {
|
||||
m = e.match(pn)
|
||||
}
|
||||
if (m)
|
||||
matchedEntries.push(e)
|
||||
}
|
||||
}
|
||||
|
||||
//console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)
|
||||
|
||||
var len = matchedEntries.length
|
||||
// If there are no matched entries, then nothing matches.
|
||||
if (len === 0)
|
||||
return cb()
|
||||
|
||||
// if this is the last remaining pattern bit, then no need for
|
||||
// an additional stat *unless* the user has specified mark or
|
||||
// stat explicitly. We know they exist, since readdir returned
|
||||
// them.
|
||||
|
||||
if (remain.length === 1 && !this.mark && !this.stat) {
|
||||
if (!this.matches[index])
|
||||
this.matches[index] = Object.create(null)
|
||||
|
||||
for (var i = 0; i < len; i ++) {
|
||||
var e = matchedEntries[i]
|
||||
if (prefix) {
|
||||
if (prefix !== '/')
|
||||
e = prefix + '/' + e
|
||||
else
|
||||
e = prefix + e
|
||||
}
|
||||
|
||||
if (e.charAt(0) === '/' && !this.nomount) {
|
||||
e = path.join(this.root, e)
|
||||
}
|
||||
this._emitMatch(index, e)
|
||||
}
|
||||
// This was the last one, and no stats were needed
|
||||
return cb()
|
||||
}
|
||||
|
||||
// now test all matched entries as stand-ins for that part
|
||||
// of the pattern.
|
||||
remain.shift()
|
||||
for (var i = 0; i < len; i ++) {
|
||||
var e = matchedEntries[i]
|
||||
var newPattern
|
||||
if (prefix) {
|
||||
if (prefix !== '/')
|
||||
e = prefix + '/' + e
|
||||
else
|
||||
e = prefix + e
|
||||
}
|
||||
this._process([e].concat(remain), index, inGlobStar, cb)
|
||||
}
|
||||
cb()
|
||||
}
|
||||
|
||||
Glob.prototype._emitMatch = function (index, e) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
if (isIgnored(this, e))
|
||||
return
|
||||
|
||||
if (this.paused) {
|
||||
this._emitQueue.push([index, e])
|
||||
return
|
||||
}
|
||||
|
||||
var abs = isAbsolute(e) ? e : this._makeAbs(e)
|
||||
|
||||
if (this.mark)
|
||||
e = this._mark(e)
|
||||
|
||||
if (this.absolute)
|
||||
e = abs
|
||||
|
||||
if (this.matches[index][e])
|
||||
return
|
||||
|
||||
if (this.nodir) {
|
||||
var c = this.cache[abs]
|
||||
if (c === 'DIR' || Array.isArray(c))
|
||||
return
|
||||
}
|
||||
|
||||
this.matches[index][e] = true
|
||||
|
||||
var st = this.statCache[abs]
|
||||
if (st)
|
||||
this.emit('stat', e, st)
|
||||
|
||||
this.emit('match', e)
|
||||
}
|
||||
|
||||
Glob.prototype._readdirInGlobStar = function (abs, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
// follow all symlinked directories forever
|
||||
// just proceed as if this is a non-globstar situation
|
||||
if (this.follow)
|
||||
return this._readdir(abs, false, cb)
|
||||
|
||||
var lstatkey = 'lstat\0' + abs
|
||||
var self = this
|
||||
var lstatcb = inflight(lstatkey, lstatcb_)
|
||||
|
||||
if (lstatcb)
|
||||
self.fs.lstat(abs, lstatcb)
|
||||
|
||||
function lstatcb_ (er, lstat) {
|
||||
if (er && er.code === 'ENOENT')
|
||||
return cb()
|
||||
|
||||
var isSym = lstat && lstat.isSymbolicLink()
|
||||
self.symlinks[abs] = isSym
|
||||
|
||||
// If it's not a symlink or a dir, then it's definitely a regular file.
|
||||
// don't bother doing a readdir in that case.
|
||||
if (!isSym && lstat && !lstat.isDirectory()) {
|
||||
self.cache[abs] = 'FILE'
|
||||
cb()
|
||||
} else
|
||||
self._readdir(abs, false, cb)
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._readdir = function (abs, inGlobStar, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb)
|
||||
if (!cb)
|
||||
return
|
||||
|
||||
//console.error('RD %j %j', +inGlobStar, abs)
|
||||
if (inGlobStar && !ownProp(this.symlinks, abs))
|
||||
return this._readdirInGlobStar(abs, cb)
|
||||
|
||||
if (ownProp(this.cache, abs)) {
|
||||
var c = this.cache[abs]
|
||||
if (!c || c === 'FILE')
|
||||
return cb()
|
||||
|
||||
if (Array.isArray(c))
|
||||
return cb(null, c)
|
||||
}
|
||||
|
||||
var self = this
|
||||
self.fs.readdir(abs, readdirCb(this, abs, cb))
|
||||
}
|
||||
|
||||
function readdirCb (self, abs, cb) {
|
||||
return function (er, entries) {
|
||||
if (er)
|
||||
self._readdirError(abs, er, cb)
|
||||
else
|
||||
self._readdirEntries(abs, entries, cb)
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._readdirEntries = function (abs, entries, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
// if we haven't asked to stat everything, then just
|
||||
// assume that everything in there exists, so we can avoid
|
||||
// having to stat it a second time.
|
||||
if (!this.mark && !this.stat) {
|
||||
for (var i = 0; i < entries.length; i ++) {
|
||||
var e = entries[i]
|
||||
if (abs === '/')
|
||||
e = abs + e
|
||||
else
|
||||
e = abs + '/' + e
|
||||
this.cache[e] = true
|
||||
}
|
||||
}
|
||||
|
||||
this.cache[abs] = entries
|
||||
return cb(null, entries)
|
||||
}
|
||||
|
||||
Glob.prototype._readdirError = function (f, er, cb) {
|
||||
if (this.aborted)
|
||||
return
|
||||
|
||||
// handle errors, and cache the information
|
||||
switch (er.code) {
|
||||
case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
|
||||
case 'ENOTDIR': // totally normal. means it *does* exist.
|
||||
var abs = this._makeAbs(f)
|
||||
this.cache[abs] = 'FILE'
|
||||
if (abs === this.cwdAbs) {
|
||||
var error = new Error(er.code + ' invalid cwd ' + this.cwd)
|
||||
error.path = this.cwd
|
||||
error.code = er.code
|
||||
this.emit('error', error)
|
||||
this.abort()
|
||||
}
|
||||
break
|
||||
|
||||
case 'ENOENT': // not terribly unusual
|
||||
case 'ELOOP':
|
||||
case 'ENAMETOOLONG':
|
||||
case 'UNKNOWN':
|
||||
this.cache[this._makeAbs(f)] = false
|
||||
break
|
||||
|
||||
default: // some unusual error. Treat as failure.
|
||||
this.cache[this._makeAbs(f)] = false
|
||||
if (this.strict) {
|
||||
this.emit('error', er)
|
||||
// If the error is handled, then we abort
|
||||
// if not, we threw out of here
|
||||
this.abort()
|
||||
}
|
||||
if (!this.silent)
|
||||
console.error('glob error', er)
|
||||
break
|
||||
}
|
||||
|
||||
return cb()
|
||||
}
|
||||
|
||||
Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {
|
||||
var self = this
|
||||
this._readdir(abs, inGlobStar, function (er, entries) {
|
||||
self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {
|
||||
//console.error('pgs2', prefix, remain[0], entries)
|
||||
|
||||
// no entries means not a dir, so it can never have matches
|
||||
// foo.txt/** doesn't match foo.txt
|
||||
if (!entries)
|
||||
return cb()
|
||||
|
||||
// test without the globstar, and with every child both below
|
||||
// and replacing the globstar.
|
||||
var remainWithoutGlobStar = remain.slice(1)
|
||||
var gspref = prefix ? [ prefix ] : []
|
||||
var noGlobStar = gspref.concat(remainWithoutGlobStar)
|
||||
|
||||
// the noGlobStar pattern exits the inGlobStar state
|
||||
this._process(noGlobStar, index, false, cb)
|
||||
|
||||
var isSym = this.symlinks[abs]
|
||||
var len = entries.length
|
||||
|
||||
// If it's a symlink, and we're in a globstar, then stop
|
||||
if (isSym && inGlobStar)
|
||||
return cb()
|
||||
|
||||
for (var i = 0; i < len; i++) {
|
||||
var e = entries[i]
|
||||
if (e.charAt(0) === '.' && !this.dot)
|
||||
continue
|
||||
|
||||
// these two cases enter the inGlobStar state
|
||||
var instead = gspref.concat(entries[i], remainWithoutGlobStar)
|
||||
this._process(instead, index, true, cb)
|
||||
|
||||
var below = gspref.concat(entries[i], remain)
|
||||
this._process(below, index, true, cb)
|
||||
}
|
||||
|
||||
cb()
|
||||
}
|
||||
|
||||
Glob.prototype._processSimple = function (prefix, index, cb) {
|
||||
// XXX review this. Shouldn't it be doing the mounting etc
|
||||
// before doing stat? kinda weird?
|
||||
var self = this
|
||||
this._stat(prefix, function (er, exists) {
|
||||
self._processSimple2(prefix, index, er, exists, cb)
|
||||
})
|
||||
}
|
||||
Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {
|
||||
|
||||
//console.error('ps2', prefix, exists)
|
||||
|
||||
if (!this.matches[index])
|
||||
this.matches[index] = Object.create(null)
|
||||
|
||||
// If it doesn't exist, then just mark the lack of results
|
||||
if (!exists)
|
||||
return cb()
|
||||
|
||||
if (prefix && isAbsolute(prefix) && !this.nomount) {
|
||||
var trail = /[\/\\]$/.test(prefix)
|
||||
if (prefix.charAt(0) === '/') {
|
||||
prefix = path.join(this.root, prefix)
|
||||
} else {
|
||||
prefix = path.resolve(this.root, prefix)
|
||||
if (trail)
|
||||
prefix += '/'
|
||||
}
|
||||
}
|
||||
|
||||
if (process.platform === 'win32')
|
||||
prefix = prefix.replace(/\\/g, '/')
|
||||
|
||||
// Mark this as a match
|
||||
this._emitMatch(index, prefix)
|
||||
cb()
|
||||
}
|
||||
|
||||
// Returns either 'DIR', 'FILE', or false
|
||||
Glob.prototype._stat = function (f, cb) {
|
||||
var abs = this._makeAbs(f)
|
||||
var needDir = f.slice(-1) === '/'
|
||||
|
||||
if (f.length > this.maxLength)
|
||||
return cb()
|
||||
|
||||
if (!this.stat && ownProp(this.cache, abs)) {
|
||||
var c = this.cache[abs]
|
||||
|
||||
if (Array.isArray(c))
|
||||
c = 'DIR'
|
||||
|
||||
// It exists, but maybe not how we need it
|
||||
if (!needDir || c === 'DIR')
|
||||
return cb(null, c)
|
||||
|
||||
if (needDir && c === 'FILE')
|
||||
return cb()
|
||||
|
||||
// otherwise we have to stat, because maybe c=true
|
||||
// if we know it exists, but not what it is.
|
||||
}
|
||||
|
||||
var exists
|
||||
var stat = this.statCache[abs]
|
||||
if (stat !== undefined) {
|
||||
if (stat === false)
|
||||
return cb(null, stat)
|
||||
else {
|
||||
var type = stat.isDirectory() ? 'DIR' : 'FILE'
|
||||
if (needDir && type === 'FILE')
|
||||
return cb()
|
||||
else
|
||||
return cb(null, type, stat)
|
||||
}
|
||||
}
|
||||
|
||||
var self = this
|
||||
var statcb = inflight('stat\0' + abs, lstatcb_)
|
||||
if (statcb)
|
||||
self.fs.lstat(abs, statcb)
|
||||
|
||||
function lstatcb_ (er, lstat) {
|
||||
if (lstat && lstat.isSymbolicLink()) {
|
||||
// If it's a symlink, then treat it as the target, unless
|
||||
// the target does not exist, then treat it as a file.
|
||||
return self.fs.stat(abs, function (er, stat) {
|
||||
if (er)
|
||||
self._stat2(f, abs, null, lstat, cb)
|
||||
else
|
||||
self._stat2(f, abs, er, stat, cb)
|
||||
})
|
||||
} else {
|
||||
self._stat2(f, abs, er, lstat, cb)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Glob.prototype._stat2 = function (f, abs, er, stat, cb) {
|
||||
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
|
||||
this.statCache[abs] = false
|
||||
return cb()
|
||||
}
|
||||
|
||||
var needDir = f.slice(-1) === '/'
|
||||
this.statCache[abs] = stat
|
||||
|
||||
if (abs.slice(-1) === '/' && stat && !stat.isDirectory())
|
||||
return cb(null, false, stat)
|
||||
|
||||
var c = true
|
||||
if (stat)
|
||||
c = stat.isDirectory() ? 'DIR' : 'FILE'
|
||||
this.cache[abs] = this.cache[abs] || c
|
||||
|
||||
if (needDir && c === 'FILE')
|
||||
return cb()
|
||||
|
||||
return cb(null, c, stat)
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "depd",
|
||||
"description": "Deprecate all the things",
|
||||
"version": "2.0.0",
|
||||
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"deprecate",
|
||||
"deprecated"
|
||||
],
|
||||
"repository": "dougwilson/nodejs-depd",
|
||||
"browser": "lib/browser/index.js",
|
||||
"devDependencies": {
|
||||
"benchmark": "2.1.4",
|
||||
"beautify-benchmark": "0.2.4",
|
||||
"eslint": "5.7.0",
|
||||
"eslint-config-standard": "12.0.0",
|
||||
"eslint-plugin-import": "2.14.0",
|
||||
"eslint-plugin-markdown": "1.0.0-beta.7",
|
||||
"eslint-plugin-node": "7.0.1",
|
||||
"eslint-plugin-promise": "4.0.1",
|
||||
"eslint-plugin-standard": "4.0.0",
|
||||
"istanbul": "0.4.5",
|
||||
"mocha": "5.2.0",
|
||||
"safe-buffer": "5.1.2",
|
||||
"uid-safe": "2.1.5"
|
||||
},
|
||||
"files": [
|
||||
"lib/",
|
||||
"History.md",
|
||||
"LICENSE",
|
||||
"index.js",
|
||||
"Readme.md"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "node benchmark/index.js",
|
||||
"lint": "eslint --plugin markdown --ext js,md .",
|
||||
"test": "mocha --reporter spec --bail test/",
|
||||
"test-ci": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter spec test/ && istanbul report lcovonly text-summary",
|
||||
"test-cov": "istanbul cover --print=none node_modules/mocha/bin/_mocha -- --reporter dot test/ && istanbul report lcov text-summary"
|
||||
}
|
||||
}
|
||||
@@ -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.01472,"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.01962,"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.00491,"91":0,"92":0,"93":0,"94":0,"95":0.00491,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0.2894,"103":0,"104":0,"105":0.00491,"106":0,"107":0.00491,"108":0,"109":0.3875,"110":0.30411,"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,"50":0,"51":0,"52":0,"53":0.00981,"54":0,"55":0,"56":0,"57":0,"58":0.00491,"59":0,"60":0,"61":0,"62":0,"63":0.00491,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0.00491,"71":0.00491,"72":0,"73":0.01472,"74":0,"75":0,"76":0.01962,"77":0,"78":0,"79":0.01472,"80":0,"81":0.00981,"83":0.01472,"84":0,"85":0.00491,"86":0.00491,"87":0.01472,"88":0.00491,"89":0,"90":0,"91":0.00491,"92":0.02453,"93":0.0981,"94":0,"95":0.01472,"96":0.00981,"97":0.01472,"98":0.00491,"99":0,"100":0.04905,"101":0,"102":0.00981,"103":0.15696,"104":0.00981,"105":0.03924,"106":0.06377,"107":0.07848,"108":0.76518,"109":8.49056,"110":4.66956,"111":0.00981,"112":0.00491,"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.02453,"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.00491,"64":0,"65":0,"66":0,"67":0.00981,"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.00491,"90":0,"91":0,"92":0,"93":0.00491,"94":0.18639,"95":0.0932,"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.00491,"16":0,"17":0,"18":0.00981,"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.00491,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0,"100":0,"101":0,"102":0,"103":0.00491,"104":0,"105":0,"106":0,"107":0.01962,"108":0.04415,"109":1.80014,"110":2.07482},E:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0.03434,"15":0.00491,_:"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.00981,"13.1":0.05886,"14.1":0.05886,"15.1":0.02943,"15.2-15.3":0,"15.4":0.02943,"15.5":0.06377,"15.6":0.56898,"16.0":0.01962,"16.1":0.07848,"16.2":0.59351,"16.3":0.51993,"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.0083,"8.1-8.4":0,"9.0-9.2":0.00623,"9.3":0.06436,"10.0-10.2":0,"10.3":0.07058,"11.0-11.2":0.01038,"11.3-11.4":0.02284,"12.0-12.1":0,"12.2-12.5":0.50654,"13.0-13.1":0,"13.2":0.00208,"13.3":0.08719,"13.4-13.7":0.03529,"14.0-14.4":0.14532,"14.5-14.8":0.58335,"15.0-15.1":0.07681,"15.2-15.3":0.08096,"15.4":0.26988,"15.5":0.64355,"15.6":0.97986,"16.0":1.51547,"16.1":5.84388,"16.2":4.37409,"16.3":3.49595,"16.4":0.0083},P:{"4":0.09534,"20":1.44072,"5.0-5.4":0,"6.2-6.4":0,"7.2-7.4":0.09534,"8.2":0,"9.2":0.02119,"10.1":0,"11.1-11.2":0.04237,"12.0":0,"13.0":0.02119,"14.0":0.01059,"15.0":0,"16.0":0.02119,"17.0":0.03178,"18.0":0.06356,"19.0":1.36657},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.80104},K:{_:"0 10 11 12 11.1 11.5 12.1"},A:{"6":0,"7":0,"8":0,"9":0,"10":0.00491,"11":0.00491,"5.5":0},N:{"10":0,"11":0},S:{"2.5":0,_:"3.0-3.1"},J:{"7":0,"10":0.0051},O:{"0":0.05605},H:{"0":0.14471},L:{"0":52.36851},R:{_:"0"},M:{"0":0.70821},Q:{"13.1":0}};
|
||||
Reference in New Issue
Block a user