new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"share.js","sources":["../src/operators/share.ts"],"names":[],"mappings":";;;;;AAAA,iDAA4C"}
|
||||
@@ -0,0 +1,7 @@
|
||||
// https://github.com/Modernizr/Modernizr/issues/615
|
||||
// documentMode is needed for false positives in oldIE, please see issue above
|
||||
Modernizr.addTest('cssfilters', function() {
|
||||
var el = document.createElement('div');
|
||||
el.style.cssText = Modernizr._prefixes.join('filter' + ':blur(2px); ');
|
||||
return !!el.style.length && ((document.documentMode === undefined || document.documentMode > 9));
|
||||
});
|
||||
@@ -0,0 +1,82 @@
|
||||
import * as tty from "tty"
|
||||
|
||||
const env = process.env
|
||||
|
||||
const isDisabled = "NO_COLOR" in env
|
||||
const isForced = "FORCE_COLOR" in env
|
||||
const isWindows = process.platform === "win32"
|
||||
|
||||
const isCompatibleTerminal =
|
||||
tty && tty.isatty(1) && env.TERM && env.TERM !== "dumb"
|
||||
|
||||
const isCI =
|
||||
"CI" in env &&
|
||||
("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env)
|
||||
|
||||
let enabled =
|
||||
!isDisabled && (isForced || isWindows || isCompatibleTerminal || isCI)
|
||||
|
||||
const raw = (open, close, searchRegex, replaceValue) => (s) =>
|
||||
enabled
|
||||
? open +
|
||||
(~(s += "").indexOf(close, 4) // skip opening \x1b[
|
||||
? s.replace(searchRegex, replaceValue)
|
||||
: s) +
|
||||
close
|
||||
: s
|
||||
|
||||
const init = (open, close) => {
|
||||
return raw(
|
||||
`\x1b[${open}m`,
|
||||
`\x1b[${close}m`,
|
||||
new RegExp(`\\x1b\\[${close}m`, "g"),
|
||||
`\x1b[${open}m`
|
||||
)
|
||||
}
|
||||
|
||||
export const options = Object.defineProperty({}, "enabled", {
|
||||
get: () => enabled,
|
||||
set: (value) => (enabled = value),
|
||||
})
|
||||
|
||||
export const reset = init(0, 0)
|
||||
export const bold = raw("\x1b[1m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[1m")
|
||||
export const dim = raw("\x1b[2m", "\x1b[22m", /\x1b\[22m/g, "\x1b[22m\x1b[2m")
|
||||
export const italic = init(3, 23)
|
||||
export const underline = init(4, 24)
|
||||
export const inverse = init(7, 27)
|
||||
export const hidden = init(8, 28)
|
||||
export const strikethrough = init(9, 29)
|
||||
export const black = init(30, 39)
|
||||
export const red = init(31, 39)
|
||||
export const green = init(32, 39)
|
||||
export const yellow = init(33, 39)
|
||||
export const blue = init(34, 39)
|
||||
export const magenta = init(35, 39)
|
||||
export const cyan = init(36, 39)
|
||||
export const white = init(37, 39)
|
||||
export const gray = init(90, 39)
|
||||
export const bgBlack = init(40, 49)
|
||||
export const bgRed = init(41, 49)
|
||||
export const bgGreen = init(42, 49)
|
||||
export const bgYellow = init(43, 49)
|
||||
export const bgBlue = init(44, 49)
|
||||
export const bgMagenta = init(45, 49)
|
||||
export const bgCyan = init(46, 49)
|
||||
export const bgWhite = init(47, 49)
|
||||
export const blackBright = init(90, 39)
|
||||
export const redBright = init(91, 39)
|
||||
export const greenBright = init(92, 39)
|
||||
export const yellowBright = init(93, 39)
|
||||
export const blueBright = init(94, 39)
|
||||
export const magentaBright = init(95, 39)
|
||||
export const cyanBright = init(96, 39)
|
||||
export const whiteBright = init(97, 39)
|
||||
export const bgBlackBright = init(100, 49)
|
||||
export const bgRedBright = init(101, 49)
|
||||
export const bgGreenBright = init(102, 49)
|
||||
export const bgYellowBright = init(103, 49)
|
||||
export const bgBlueBright = init(104, 49)
|
||||
export const bgMagentaBright = init(105, 49)
|
||||
export const bgCyanBright = init(106, 49)
|
||||
export const bgWhiteBright = init(107, 49)
|
||||
@@ -0,0 +1 @@
|
||||
export * from 'rxjs-compat/operators/distinct';
|
||||
@@ -0,0 +1,80 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isEAN;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
/**
|
||||
* The most commonly used EAN standard is
|
||||
* the thirteen-digit EAN-13, while the
|
||||
* less commonly used 8-digit EAN-8 barcode was
|
||||
* introduced for use on small packages.
|
||||
* EAN consists of:
|
||||
* GS1 prefix, manufacturer code, product code and check digit
|
||||
* Reference: https://en.wikipedia.org/wiki/International_Article_Number
|
||||
*/
|
||||
|
||||
/**
|
||||
* Define EAN Lenghts; 8 for EAN-8; 13 for EAN-13
|
||||
* and Regular Expression for valid EANs (EAN-8, EAN-13),
|
||||
* with exact numberic matching of 8 or 13 digits [0-9]
|
||||
*/
|
||||
var LENGTH_EAN_8 = 8;
|
||||
var validEanRegex = /^(\d{8}|\d{13})$/;
|
||||
/**
|
||||
* Get position weight given:
|
||||
* EAN length and digit index/position
|
||||
*
|
||||
* @param {number} length
|
||||
* @param {number} index
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
function getPositionWeightThroughLengthAndIndex(length, index) {
|
||||
if (length === LENGTH_EAN_8) {
|
||||
return index % 2 === 0 ? 3 : 1;
|
||||
}
|
||||
|
||||
return index % 2 === 0 ? 1 : 3;
|
||||
}
|
||||
/**
|
||||
* Calculate EAN Check Digit
|
||||
* Reference: https://en.wikipedia.org/wiki/International_Article_Number#Calculation_of_checksum_digit
|
||||
*
|
||||
* @param {string} ean
|
||||
* @return {number}
|
||||
*/
|
||||
|
||||
|
||||
function calculateCheckDigit(ean) {
|
||||
var checksum = ean.slice(0, -1).split('').map(function (char, index) {
|
||||
return Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index);
|
||||
}).reduce(function (acc, partialSum) {
|
||||
return acc + partialSum;
|
||||
}, 0);
|
||||
var remainder = 10 - checksum % 10;
|
||||
return remainder < 10 ? remainder : 0;
|
||||
}
|
||||
/**
|
||||
* Check if string is valid EAN:
|
||||
* Matches EAN-8/EAN-13 regex
|
||||
* Has valid check digit.
|
||||
*
|
||||
* @param {string} str
|
||||
* @return {boolean}
|
||||
*/
|
||||
|
||||
|
||||
function isEAN(str) {
|
||||
(0, _assertString.default)(str);
|
||||
var actualCheckDigit = Number(str.slice(-1));
|
||||
return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str);
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"exit-on-epipe","version":"1.0.1","files":{"package.json":{"checkedAt":1678887830447,"integrity":"sha512-Fj/llD0Nlw7vaNMY5YeDQXJLXLaH3LfVF5ILJhEqwJxW1+5lBd/qF1M7Leqh70hZtyl/bfZCTtLvrCbxJNJGHw==","mode":420,"size":589},"README.md":{"checkedAt":1678887830447,"integrity":"sha512-nvSZWanhkQwwIX9C+RYCSIo8JmbwcBjlGnVqoyzXX4xGZs7/5pqtU1W8jA6itj3qj/Jc+n0PpPxAB0/xlbtvNA==","mode":420,"size":3044},"LICENSE":{"checkedAt":1678887830447,"integrity":"sha512-we4T6fJg8hOK1gdM6L/oZO1cEDaXGHm3lw2zKJOu7zj+TutOA/ZeF15NNrhlyAl061Yy3zU4AcXbt8zDwN/BYQ==","mode":420,"size":587},"exit-on-epipe.js":{"checkedAt":1678887830447,"integrity":"sha512-Vrhf3diJSAnLDxAnvVlRLfkadQTRzFBSZUX2BlSJ6CwmCAiHgZKHkdYKRucT35lV8Dg7bNz+WjL757YnUbnc0g==","mode":420,"size":775}}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J E F G A B BC"},B:{"1":"P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t","2":"C K L H M N O"},C:{"1":"p q r s D t xB yB","2":"0 1 2 3 4 5 6 7 8 9 CC tB I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB DC EC","194":"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 e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o"},D:{"1":"hB iB jB kB e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w 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","322":"YB uB ZB vB aB bB cB dB eB fB gB"},E:{"1":"NC","2":"I u J E F G A B C K L H GC zB HC IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B"},F:{"1":"cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB OC PC QC RC qB 9B SC rB","322":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},G:{"2":"F zB TC AC UC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"2":"E A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"0B 0C 1C 2C 3C 4C sB 5C 6C 7C","2":"I vC wC xC yC zC"},Q:{"1":"1B"},R:{"1":"8C"},S:{"194":"9C"}},B:1,C:"OffscreenCanvas"};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"J E F G BC","292":"A B"},B:{"1":"P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t","2":"C K L H M N O"},C:{"1":"RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB","2":"CC tB DC EC","164":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},D:{"1":"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 e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"0 1 2 3 4 5 6 7 8 9 I u J E F G A B C K L H M N O v w x y z AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"G A B C K L H KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u J E F GC zB HC IC JC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w x y z OC PC QC RC qB 9B SC rB"},G:{"1":"YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"F zB TC AC UC VC WC XC"},H:{"2":"nC"},I:{"1":"D","2":"tB I oC pC qC rC AC sC tC"},J:{"2":"E A"},K:{"1":"e","2":"A B C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"uC"},P:{"1":"vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C","2":"I"},Q:{"1":"1B"},R:{"1":"8C"},S:{"164":"9C"}},B:5,C:":placeholder-shown CSS pseudo-class"};
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"scheduleIterable.js","sources":["../../src/internal/scheduled/scheduleIterable.ts"],"names":[],"mappings":";;AAAA,4CAA2C;AAE3C,gDAA+C;AAC/C,+CAAiE;AAEjE,SAAgB,gBAAgB,CAAI,KAAkB,EAAE,SAAwB;IAC9E,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IACD,OAAO,IAAI,uBAAU,CAAI,UAAA,UAAU;QACjC,IAAM,GAAG,GAAG,IAAI,2BAAY,EAAE,CAAC;QAC/B,IAAI,QAAqB,CAAC;QAC1B,GAAG,CAAC,GAAG,CAAC;YAEN,IAAI,QAAQ,IAAI,OAAO,QAAQ,CAAC,MAAM,KAAK,UAAU,EAAE;gBACrD,QAAQ,CAAC,MAAM,EAAE,CAAC;aACnB;QACH,CAAC,CAAC,CAAC;QACH,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC;YACzB,QAAQ,GAAG,KAAK,CAAC,mBAAe,CAAC,EAAE,CAAC;YACpC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC;gBACzB,IAAI,UAAU,CAAC,MAAM,EAAE;oBACrB,OAAO;iBACR;gBACD,IAAI,KAAQ,CAAC;gBACb,IAAI,IAAa,CAAC;gBAClB,IAAI;oBACF,IAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;oBAC/B,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;oBACrB,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;iBACpB;gBAAC,OAAO,GAAG,EAAE;oBACZ,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;oBACtB,OAAO;iBACR;gBACD,IAAI,IAAI,EAAE;oBACR,UAAU,CAAC,QAAQ,EAAE,CAAC;iBACvB;qBAAM;oBACL,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBACvB,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjB;YACH,CAAC,CAAC,CAAC,CAAC;QACN,CAAC,CAAC,CAAC,CAAC;QACJ,OAAO,GAAG,CAAC;IACb,CAAC,CAAC,CAAC;AACL,CAAC;AAvCD,4CAuCC"}
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"ObjectUnsubscribedError.js","sources":["../src/util/ObjectUnsubscribedError.ts"],"names":[],"mappings":";;;;;AAAA,8DAAyD"}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"2":"BC","8":"J E F G A B"},B:{"1":"P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t","8":"C K L H M N O"},C:{"1":"1 2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB","2":"CC","8":"0 tB I u J E F G A B C K L H M N O v w x y z DC EC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 w 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 e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"I u J E F G A B C K","8":"L H M N O v"},E:{"1":"J E F G A B C K L H IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"GC zB","8":"I u HC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 H M N O v w 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 e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d","2":"G B OC PC QC RC","8":"C qB 9B SC rB"},G:{"1":"F VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"zB","8":"TC AC UC"},H:{"2":"nC"},I:{"1":"D sC tC","8":"tB I oC pC qC rC AC"},J:{"1":"A","8":"E"},K:{"1":"e","2":"A B","8":"C qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:1,C:"srcdoc attribute for iframes"};
|
||||
@@ -0,0 +1,217 @@
|
||||
/** PURE_IMPORTS_START tslib,_.._Subject,_.._Subscriber,_.._Observable,_.._Subscription,_.._ReplaySubject PURE_IMPORTS_END */
|
||||
import * as tslib_1 from "tslib";
|
||||
import { Subject, AnonymousSubject } from '../../Subject';
|
||||
import { Subscriber } from '../../Subscriber';
|
||||
import { Observable } from '../../Observable';
|
||||
import { Subscription } from '../../Subscription';
|
||||
import { ReplaySubject } from '../../ReplaySubject';
|
||||
var DEFAULT_WEBSOCKET_CONFIG = {
|
||||
url: '',
|
||||
deserializer: function (e) { return JSON.parse(e.data); },
|
||||
serializer: function (value) { return JSON.stringify(value); },
|
||||
};
|
||||
var WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT = 'WebSocketSubject.error must be called with an object with an error code, and an optional reason: { code: number, reason: string }';
|
||||
var WebSocketSubject = /*@__PURE__*/ (function (_super) {
|
||||
tslib_1.__extends(WebSocketSubject, _super);
|
||||
function WebSocketSubject(urlConfigOrSource, destination) {
|
||||
var _this = _super.call(this) || this;
|
||||
if (urlConfigOrSource instanceof Observable) {
|
||||
_this.destination = destination;
|
||||
_this.source = urlConfigOrSource;
|
||||
}
|
||||
else {
|
||||
var config = _this._config = tslib_1.__assign({}, DEFAULT_WEBSOCKET_CONFIG);
|
||||
_this._output = new Subject();
|
||||
if (typeof urlConfigOrSource === 'string') {
|
||||
config.url = urlConfigOrSource;
|
||||
}
|
||||
else {
|
||||
for (var 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();
|
||||
}
|
||||
return _this;
|
||||
}
|
||||
WebSocketSubject.prototype.lift = function (operator) {
|
||||
var sock = new WebSocketSubject(this._config, this.destination);
|
||||
sock.operator = operator;
|
||||
sock.source = this;
|
||||
return sock;
|
||||
};
|
||||
WebSocketSubject.prototype._resetState = function () {
|
||||
this._socket = null;
|
||||
if (!this.source) {
|
||||
this.destination = new ReplaySubject();
|
||||
}
|
||||
this._output = new Subject();
|
||||
};
|
||||
WebSocketSubject.prototype.multiplex = function (subMsg, unsubMsg, messageFilter) {
|
||||
var self = this;
|
||||
return new Observable(function (observer) {
|
||||
try {
|
||||
self.next(subMsg());
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
var subscription = self.subscribe(function (x) {
|
||||
try {
|
||||
if (messageFilter(x)) {
|
||||
observer.next(x);
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
}, function (err) { return observer.error(err); }, function () { return observer.complete(); });
|
||||
return function () {
|
||||
try {
|
||||
self.next(unsubMsg());
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
subscription.unsubscribe();
|
||||
};
|
||||
});
|
||||
};
|
||||
WebSocketSubject.prototype._connectSocket = function () {
|
||||
var _this = this;
|
||||
var _a = this._config, WebSocketCtor = _a.WebSocketCtor, protocol = _a.protocol, url = _a.url, binaryType = _a.binaryType;
|
||||
var observer = this._output;
|
||||
var 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;
|
||||
}
|
||||
var subscription = new Subscription(function () {
|
||||
_this._socket = null;
|
||||
if (socket && socket.readyState === 1) {
|
||||
socket.close();
|
||||
}
|
||||
});
|
||||
socket.onopen = function (e) {
|
||||
var _socket = _this._socket;
|
||||
if (!_socket) {
|
||||
socket.close();
|
||||
_this._resetState();
|
||||
return;
|
||||
}
|
||||
var openObserver = _this._config.openObserver;
|
||||
if (openObserver) {
|
||||
openObserver.next(e);
|
||||
}
|
||||
var queue = _this.destination;
|
||||
_this.destination = Subscriber.create(function (x) {
|
||||
if (socket.readyState === 1) {
|
||||
try {
|
||||
var serializer = _this._config.serializer;
|
||||
socket.send(serializer(x));
|
||||
}
|
||||
catch (e) {
|
||||
_this.destination.error(e);
|
||||
}
|
||||
}
|
||||
}, function (e) {
|
||||
var closingObserver = _this._config.closingObserver;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
if (e && e.code) {
|
||||
socket.close(e.code, e.reason);
|
||||
}
|
||||
else {
|
||||
observer.error(new TypeError(WEBSOCKETSUBJECT_INVALID_ERROR_OBJECT));
|
||||
}
|
||||
_this._resetState();
|
||||
}, function () {
|
||||
var closingObserver = _this._config.closingObserver;
|
||||
if (closingObserver) {
|
||||
closingObserver.next(undefined);
|
||||
}
|
||||
socket.close();
|
||||
_this._resetState();
|
||||
});
|
||||
if (queue && queue instanceof ReplaySubject) {
|
||||
subscription.add(queue.subscribe(_this.destination));
|
||||
}
|
||||
};
|
||||
socket.onerror = function (e) {
|
||||
_this._resetState();
|
||||
observer.error(e);
|
||||
};
|
||||
socket.onclose = function (e) {
|
||||
_this._resetState();
|
||||
var closeObserver = _this._config.closeObserver;
|
||||
if (closeObserver) {
|
||||
closeObserver.next(e);
|
||||
}
|
||||
if (e.wasClean) {
|
||||
observer.complete();
|
||||
}
|
||||
else {
|
||||
observer.error(e);
|
||||
}
|
||||
};
|
||||
socket.onmessage = function (e) {
|
||||
try {
|
||||
var deserializer = _this._config.deserializer;
|
||||
observer.next(deserializer(e));
|
||||
}
|
||||
catch (err) {
|
||||
observer.error(err);
|
||||
}
|
||||
};
|
||||
};
|
||||
WebSocketSubject.prototype._subscribe = function (subscriber) {
|
||||
var _this = this;
|
||||
var source = this.source;
|
||||
if (source) {
|
||||
return source.subscribe(subscriber);
|
||||
}
|
||||
if (!this._socket) {
|
||||
this._connectSocket();
|
||||
}
|
||||
this._output.subscribe(subscriber);
|
||||
subscriber.add(function () {
|
||||
var _socket = _this._socket;
|
||||
if (_this._output.observers.length === 0) {
|
||||
if (_socket && _socket.readyState === 1) {
|
||||
_socket.close();
|
||||
}
|
||||
_this._resetState();
|
||||
}
|
||||
});
|
||||
return subscriber;
|
||||
};
|
||||
WebSocketSubject.prototype.unsubscribe = function () {
|
||||
var _socket = this._socket;
|
||||
if (_socket && _socket.readyState === 1) {
|
||||
_socket.close();
|
||||
}
|
||||
this._resetState();
|
||||
_super.prototype.unsubscribe.call(this);
|
||||
};
|
||||
return WebSocketSubject;
|
||||
}(AnonymousSubject));
|
||||
export { WebSocketSubject };
|
||||
//# sourceMappingURL=WebSocketSubject.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"windowTime.js","sources":["../src/operator/windowTime.ts"],"names":[],"mappings":";;;;;AAAA,qDAAgD"}
|
||||
@@ -0,0 +1,222 @@
|
||||
import { isFunction } from './util/isFunction';
|
||||
import { empty as emptyObserver } from './Observer';
|
||||
import { Subscription } from './Subscription';
|
||||
import { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';
|
||||
import { config } from './config';
|
||||
import { hostReportError } from './util/hostReportError';
|
||||
export class Subscriber extends Subscription {
|
||||
constructor(destinationOrNext, error, complete) {
|
||||
super();
|
||||
this.syncErrorValue = null;
|
||||
this.syncErrorThrown = false;
|
||||
this.syncErrorThrowable = false;
|
||||
this.isStopped = false;
|
||||
switch (arguments.length) {
|
||||
case 0:
|
||||
this.destination = emptyObserver;
|
||||
break;
|
||||
case 1:
|
||||
if (!destinationOrNext) {
|
||||
this.destination = emptyObserver;
|
||||
break;
|
||||
}
|
||||
if (typeof destinationOrNext === 'object') {
|
||||
if (destinationOrNext instanceof Subscriber) {
|
||||
this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
|
||||
this.destination = destinationOrNext;
|
||||
destinationOrNext.add(this);
|
||||
}
|
||||
else {
|
||||
this.syncErrorThrowable = true;
|
||||
this.destination = new SafeSubscriber(this, destinationOrNext);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
this.syncErrorThrowable = true;
|
||||
this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);
|
||||
break;
|
||||
}
|
||||
}
|
||||
[rxSubscriberSymbol]() { return this; }
|
||||
static create(next, error, complete) {
|
||||
const subscriber = new Subscriber(next, error, complete);
|
||||
subscriber.syncErrorThrowable = false;
|
||||
return subscriber;
|
||||
}
|
||||
next(value) {
|
||||
if (!this.isStopped) {
|
||||
this._next(value);
|
||||
}
|
||||
}
|
||||
error(err) {
|
||||
if (!this.isStopped) {
|
||||
this.isStopped = true;
|
||||
this._error(err);
|
||||
}
|
||||
}
|
||||
complete() {
|
||||
if (!this.isStopped) {
|
||||
this.isStopped = true;
|
||||
this._complete();
|
||||
}
|
||||
}
|
||||
unsubscribe() {
|
||||
if (this.closed) {
|
||||
return;
|
||||
}
|
||||
this.isStopped = true;
|
||||
super.unsubscribe();
|
||||
}
|
||||
_next(value) {
|
||||
this.destination.next(value);
|
||||
}
|
||||
_error(err) {
|
||||
this.destination.error(err);
|
||||
this.unsubscribe();
|
||||
}
|
||||
_complete() {
|
||||
this.destination.complete();
|
||||
this.unsubscribe();
|
||||
}
|
||||
_unsubscribeAndRecycle() {
|
||||
const { _parentOrParents } = this;
|
||||
this._parentOrParents = null;
|
||||
this.unsubscribe();
|
||||
this.closed = false;
|
||||
this.isStopped = false;
|
||||
this._parentOrParents = _parentOrParents;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
export class SafeSubscriber extends Subscriber {
|
||||
constructor(_parentSubscriber, observerOrNext, error, complete) {
|
||||
super();
|
||||
this._parentSubscriber = _parentSubscriber;
|
||||
let next;
|
||||
let context = this;
|
||||
if (isFunction(observerOrNext)) {
|
||||
next = observerOrNext;
|
||||
}
|
||||
else if (observerOrNext) {
|
||||
next = observerOrNext.next;
|
||||
error = observerOrNext.error;
|
||||
complete = observerOrNext.complete;
|
||||
if (observerOrNext !== emptyObserver) {
|
||||
context = Object.create(observerOrNext);
|
||||
if (isFunction(context.unsubscribe)) {
|
||||
this.add(context.unsubscribe.bind(context));
|
||||
}
|
||||
context.unsubscribe = this.unsubscribe.bind(this);
|
||||
}
|
||||
}
|
||||
this._context = context;
|
||||
this._next = next;
|
||||
this._error = error;
|
||||
this._complete = complete;
|
||||
}
|
||||
next(value) {
|
||||
if (!this.isStopped && this._next) {
|
||||
const { _parentSubscriber } = this;
|
||||
if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
|
||||
this.__tryOrUnsub(this._next, value);
|
||||
}
|
||||
else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {
|
||||
this.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
error(err) {
|
||||
if (!this.isStopped) {
|
||||
const { _parentSubscriber } = this;
|
||||
const { useDeprecatedSynchronousErrorHandling } = config;
|
||||
if (this._error) {
|
||||
if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
|
||||
this.__tryOrUnsub(this._error, err);
|
||||
this.unsubscribe();
|
||||
}
|
||||
else {
|
||||
this.__tryOrSetError(_parentSubscriber, this._error, err);
|
||||
this.unsubscribe();
|
||||
}
|
||||
}
|
||||
else if (!_parentSubscriber.syncErrorThrowable) {
|
||||
this.unsubscribe();
|
||||
if (useDeprecatedSynchronousErrorHandling) {
|
||||
throw err;
|
||||
}
|
||||
hostReportError(err);
|
||||
}
|
||||
else {
|
||||
if (useDeprecatedSynchronousErrorHandling) {
|
||||
_parentSubscriber.syncErrorValue = err;
|
||||
_parentSubscriber.syncErrorThrown = true;
|
||||
}
|
||||
else {
|
||||
hostReportError(err);
|
||||
}
|
||||
this.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
complete() {
|
||||
if (!this.isStopped) {
|
||||
const { _parentSubscriber } = this;
|
||||
if (this._complete) {
|
||||
const wrappedComplete = () => this._complete.call(this._context);
|
||||
if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
|
||||
this.__tryOrUnsub(wrappedComplete);
|
||||
this.unsubscribe();
|
||||
}
|
||||
else {
|
||||
this.__tryOrSetError(_parentSubscriber, wrappedComplete);
|
||||
this.unsubscribe();
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.unsubscribe();
|
||||
}
|
||||
}
|
||||
}
|
||||
__tryOrUnsub(fn, value) {
|
||||
try {
|
||||
fn.call(this._context, value);
|
||||
}
|
||||
catch (err) {
|
||||
this.unsubscribe();
|
||||
if (config.useDeprecatedSynchronousErrorHandling) {
|
||||
throw err;
|
||||
}
|
||||
else {
|
||||
hostReportError(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
__tryOrSetError(parent, fn, value) {
|
||||
if (!config.useDeprecatedSynchronousErrorHandling) {
|
||||
throw new Error('bad call');
|
||||
}
|
||||
try {
|
||||
fn.call(this._context, value);
|
||||
}
|
||||
catch (err) {
|
||||
if (config.useDeprecatedSynchronousErrorHandling) {
|
||||
parent.syncErrorValue = err;
|
||||
parent.syncErrorThrown = true;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
hostReportError(err);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_unsubscribe() {
|
||||
const { _parentSubscriber } = this;
|
||||
this._context = null;
|
||||
this._parentSubscriber = null;
|
||||
_parentSubscriber.unsubscribe();
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=Subscriber.js.map
|
||||
@@ -0,0 +1,518 @@
|
||||
# yargs-parser
|
||||
|
||||

|
||||
[](https://www.npmjs.com/package/yargs-parser)
|
||||
[](https://conventionalcommits.org)
|
||||

|
||||
|
||||
The mighty option parser used by [yargs](https://github.com/yargs/yargs).
|
||||
|
||||
visit the [yargs website](http://yargs.js.org/) for more examples, and thorough usage instructions.
|
||||
|
||||
<img width="250" src="https://raw.githubusercontent.com/yargs/yargs-parser/master/yargs-logo.png">
|
||||
|
||||
## Example
|
||||
|
||||
```sh
|
||||
npm i yargs-parser --save
|
||||
```
|
||||
|
||||
```js
|
||||
const argv = require('yargs-parser')(process.argv.slice(2))
|
||||
console.log(argv)
|
||||
```
|
||||
|
||||
```console
|
||||
$ node example.js --foo=33 --bar hello
|
||||
{ _: [], foo: 33, bar: 'hello' }
|
||||
```
|
||||
|
||||
_or parse a string!_
|
||||
|
||||
```js
|
||||
const argv = require('yargs-parser')('--foo=99 --bar=33')
|
||||
console.log(argv)
|
||||
```
|
||||
|
||||
```console
|
||||
{ _: [], foo: 99, bar: 33 }
|
||||
```
|
||||
|
||||
Convert an array of mixed types before passing to `yargs-parser`:
|
||||
|
||||
```js
|
||||
const parse = require('yargs-parser')
|
||||
parse(['-f', 11, '--zoom', 55].join(' ')) // <-- array to string
|
||||
parse(['-f', 11, '--zoom', 55].map(String)) // <-- array of strings
|
||||
```
|
||||
|
||||
## Deno Example
|
||||
|
||||
As of `v19` `yargs-parser` supports [Deno](https://github.com/denoland/deno):
|
||||
|
||||
```typescript
|
||||
import parser from "https://deno.land/x/yargs_parser/deno.ts";
|
||||
|
||||
const argv = parser('--foo=99 --bar=9987930', {
|
||||
string: ['bar']
|
||||
})
|
||||
console.log(argv)
|
||||
```
|
||||
|
||||
## ESM Example
|
||||
|
||||
As of `v19` `yargs-parser` supports ESM (_both in Node.js and in the browser_):
|
||||
|
||||
**Node.js:**
|
||||
|
||||
```js
|
||||
import parser from 'yargs-parser'
|
||||
|
||||
const argv = parser('--foo=99 --bar=9987930', {
|
||||
string: ['bar']
|
||||
})
|
||||
console.log(argv)
|
||||
```
|
||||
|
||||
**Browsers:**
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<body>
|
||||
<script type="module">
|
||||
import parser from "https://unpkg.com/yargs-parser@19.0.0/browser.js";
|
||||
|
||||
const argv = parser('--foo=99 --bar=9987930', {
|
||||
string: ['bar']
|
||||
})
|
||||
console.log(argv)
|
||||
</script>
|
||||
</body>
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### parser(args, opts={})
|
||||
|
||||
Parses command line arguments returning a simple mapping of keys and values.
|
||||
|
||||
**expects:**
|
||||
|
||||
* `args`: a string or array of strings representing the options to parse.
|
||||
* `opts`: provide a set of hints indicating how `args` should be parsed:
|
||||
* `opts.alias`: an object representing the set of aliases for a key: `{alias: {foo: ['f']}}`.
|
||||
* `opts.array`: indicate that keys should be parsed as an array: `{array: ['foo', 'bar']}`.<br>
|
||||
Indicate that keys should be parsed as an array and coerced to booleans / numbers:<br>
|
||||
`{array: [{ key: 'foo', boolean: true }, {key: 'bar', number: true}]}`.
|
||||
* `opts.boolean`: arguments should be parsed as booleans: `{boolean: ['x', 'y']}`.
|
||||
* `opts.coerce`: provide a custom synchronous function that returns a coerced value from the argument provided
|
||||
(or throws an error). For arrays the function is called only once for the entire array:<br>
|
||||
`{coerce: {foo: function (arg) {return modifiedArg}}}`.
|
||||
* `opts.config`: indicate a key that represents a path to a configuration file (this file will be loaded and parsed).
|
||||
* `opts.configObjects`: configuration objects to parse, their properties will be set as arguments:<br>
|
||||
`{configObjects: [{'x': 5, 'y': 33}, {'z': 44}]}`.
|
||||
* `opts.configuration`: provide configuration options to the yargs-parser (see: [configuration](#configuration)).
|
||||
* `opts.count`: indicate a key that should be used as a counter, e.g., `-vvv` = `{v: 3}`.
|
||||
* `opts.default`: provide default values for keys: `{default: {x: 33, y: 'hello world!'}}`.
|
||||
* `opts.envPrefix`: environment variables (`process.env`) with the prefix provided should be parsed.
|
||||
* `opts.narg`: specify that a key requires `n` arguments: `{narg: {x: 2}}`.
|
||||
* `opts.normalize`: `path.normalize()` will be applied to values set to this key.
|
||||
* `opts.number`: keys should be treated as numbers.
|
||||
* `opts.string`: keys should be treated as strings (even if they resemble a number `-x 33`).
|
||||
|
||||
**returns:**
|
||||
|
||||
* `obj`: an object representing the parsed value of `args`
|
||||
* `key/value`: key value pairs for each argument and their aliases.
|
||||
* `_`: an array representing the positional arguments.
|
||||
* [optional] `--`: an array with arguments after the end-of-options flag `--`.
|
||||
|
||||
### require('yargs-parser').detailed(args, opts={})
|
||||
|
||||
Parses a command line string, returning detailed information required by the
|
||||
yargs engine.
|
||||
|
||||
**expects:**
|
||||
|
||||
* `args`: a string or array of strings representing options to parse.
|
||||
* `opts`: provide a set of hints indicating how `args`, inputs are identical to `require('yargs-parser')(args, opts={})`.
|
||||
|
||||
**returns:**
|
||||
|
||||
* `argv`: an object representing the parsed value of `args`
|
||||
* `key/value`: key value pairs for each argument and their aliases.
|
||||
* `_`: an array representing the positional arguments.
|
||||
* [optional] `--`: an array with arguments after the end-of-options flag `--`.
|
||||
* `error`: populated with an error object if an exception occurred during parsing.
|
||||
* `aliases`: the inferred list of aliases built by combining lists in `opts.alias`.
|
||||
* `newAliases`: any new aliases added via camel-case expansion:
|
||||
* `boolean`: `{ fooBar: true }`
|
||||
* `defaulted`: any new argument created by `opts.default`, no aliases included.
|
||||
* `boolean`: `{ foo: true }`
|
||||
* `configuration`: given by default settings and `opts.configuration`.
|
||||
|
||||
<a name="configuration"></a>
|
||||
|
||||
### Configuration
|
||||
|
||||
The yargs-parser applies several automated transformations on the keys provided
|
||||
in `args`. These features can be turned on and off using the `configuration` field
|
||||
of `opts`.
|
||||
|
||||
```js
|
||||
var parsed = parser(['--no-dice'], {
|
||||
configuration: {
|
||||
'boolean-negation': false
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### short option groups
|
||||
|
||||
* default: `true`.
|
||||
* key: `short-option-groups`.
|
||||
|
||||
Should a group of short-options be treated as boolean flags?
|
||||
|
||||
```console
|
||||
$ node example.js -abc
|
||||
{ _: [], a: true, b: true, c: true }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js -abc
|
||||
{ _: [], abc: true }
|
||||
```
|
||||
|
||||
### camel-case expansion
|
||||
|
||||
* default: `true`.
|
||||
* key: `camel-case-expansion`.
|
||||
|
||||
Should hyphenated arguments be expanded into camel-case aliases?
|
||||
|
||||
```console
|
||||
$ node example.js --foo-bar
|
||||
{ _: [], 'foo-bar': true, fooBar: true }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --foo-bar
|
||||
{ _: [], 'foo-bar': true }
|
||||
```
|
||||
|
||||
### dot-notation
|
||||
|
||||
* default: `true`
|
||||
* key: `dot-notation`
|
||||
|
||||
Should keys that contain `.` be treated as objects?
|
||||
|
||||
```console
|
||||
$ node example.js --foo.bar
|
||||
{ _: [], foo: { bar: true } }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --foo.bar
|
||||
{ _: [], "foo.bar": true }
|
||||
```
|
||||
|
||||
### parse numbers
|
||||
|
||||
* default: `true`
|
||||
* key: `parse-numbers`
|
||||
|
||||
Should keys that look like numbers be treated as such?
|
||||
|
||||
```console
|
||||
$ node example.js --foo=99.3
|
||||
{ _: [], foo: 99.3 }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --foo=99.3
|
||||
{ _: [], foo: "99.3" }
|
||||
```
|
||||
|
||||
### parse positional numbers
|
||||
|
||||
* default: `true`
|
||||
* key: `parse-positional-numbers`
|
||||
|
||||
Should positional keys that look like numbers be treated as such.
|
||||
|
||||
```console
|
||||
$ node example.js 99.3
|
||||
{ _: [99.3] }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js 99.3
|
||||
{ _: ['99.3'] }
|
||||
```
|
||||
|
||||
### boolean negation
|
||||
|
||||
* default: `true`
|
||||
* key: `boolean-negation`
|
||||
|
||||
Should variables prefixed with `--no` be treated as negations?
|
||||
|
||||
```console
|
||||
$ node example.js --no-foo
|
||||
{ _: [], foo: false }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --no-foo
|
||||
{ _: [], "no-foo": true }
|
||||
```
|
||||
|
||||
### combine arrays
|
||||
|
||||
* default: `false`
|
||||
* key: `combine-arrays`
|
||||
|
||||
Should arrays be combined when provided by both command line arguments and
|
||||
a configuration file.
|
||||
|
||||
### duplicate arguments array
|
||||
|
||||
* default: `true`
|
||||
* key: `duplicate-arguments-array`
|
||||
|
||||
Should arguments be coerced into an array when duplicated:
|
||||
|
||||
```console
|
||||
$ node example.js -x 1 -x 2
|
||||
{ _: [], x: [1, 2] }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js -x 1 -x 2
|
||||
{ _: [], x: 2 }
|
||||
```
|
||||
|
||||
### flatten duplicate arrays
|
||||
|
||||
* default: `true`
|
||||
* key: `flatten-duplicate-arrays`
|
||||
|
||||
Should array arguments be coerced into a single array when duplicated:
|
||||
|
||||
```console
|
||||
$ node example.js -x 1 2 -x 3 4
|
||||
{ _: [], x: [1, 2, 3, 4] }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js -x 1 2 -x 3 4
|
||||
{ _: [], x: [[1, 2], [3, 4]] }
|
||||
```
|
||||
|
||||
### greedy arrays
|
||||
|
||||
* default: `true`
|
||||
* key: `greedy-arrays`
|
||||
|
||||
Should arrays consume more than one positional argument following their flag.
|
||||
|
||||
```console
|
||||
$ node example --arr 1 2
|
||||
{ _[], arr: [1, 2] }
|
||||
```
|
||||
|
||||
_if disabled:_
|
||||
|
||||
```console
|
||||
$ node example --arr 1 2
|
||||
{ _[2], arr: [1] }
|
||||
```
|
||||
|
||||
**Note: in `v18.0.0` we are considering defaulting greedy arrays to `false`.**
|
||||
|
||||
### nargs eats options
|
||||
|
||||
* default: `false`
|
||||
* key: `nargs-eats-options`
|
||||
|
||||
Should nargs consume dash options as well as positional arguments.
|
||||
|
||||
### negation prefix
|
||||
|
||||
* default: `no-`
|
||||
* key: `negation-prefix`
|
||||
|
||||
The prefix to use for negated boolean variables.
|
||||
|
||||
```console
|
||||
$ node example.js --no-foo
|
||||
{ _: [], foo: false }
|
||||
```
|
||||
|
||||
_if set to `quux`:_
|
||||
|
||||
```console
|
||||
$ node example.js --quuxfoo
|
||||
{ _: [], foo: false }
|
||||
```
|
||||
|
||||
### populate --
|
||||
|
||||
* default: `false`.
|
||||
* key: `populate--`
|
||||
|
||||
Should unparsed flags be stored in `--` or `_`.
|
||||
|
||||
_If disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js a -b -- x y
|
||||
{ _: [ 'a', 'x', 'y' ], b: true }
|
||||
```
|
||||
|
||||
_If enabled:_
|
||||
|
||||
```console
|
||||
$ node example.js a -b -- x y
|
||||
{ _: [ 'a' ], '--': [ 'x', 'y' ], b: true }
|
||||
```
|
||||
|
||||
### set placeholder key
|
||||
|
||||
* default: `false`.
|
||||
* key: `set-placeholder-key`.
|
||||
|
||||
Should a placeholder be added for keys not set via the corresponding CLI argument?
|
||||
|
||||
_If disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js -a 1 -c 2
|
||||
{ _: [], a: 1, c: 2 }
|
||||
```
|
||||
|
||||
_If enabled:_
|
||||
|
||||
```console
|
||||
$ node example.js -a 1 -c 2
|
||||
{ _: [], a: 1, b: undefined, c: 2 }
|
||||
```
|
||||
|
||||
### halt at non-option
|
||||
|
||||
* default: `false`.
|
||||
* key: `halt-at-non-option`.
|
||||
|
||||
Should parsing stop at the first positional argument? This is similar to how e.g. `ssh` parses its command line.
|
||||
|
||||
_If disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js -a run b -x y
|
||||
{ _: [ 'b' ], a: 'run', x: 'y' }
|
||||
```
|
||||
|
||||
_If enabled:_
|
||||
|
||||
```console
|
||||
$ node example.js -a run b -x y
|
||||
{ _: [ 'b', '-x', 'y' ], a: 'run' }
|
||||
```
|
||||
|
||||
### strip aliased
|
||||
|
||||
* default: `false`
|
||||
* key: `strip-aliased`
|
||||
|
||||
Should aliases be removed before returning results?
|
||||
|
||||
_If disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --test-field 1
|
||||
{ _: [], 'test-field': 1, testField: 1, 'test-alias': 1, testAlias: 1 }
|
||||
```
|
||||
|
||||
_If enabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --test-field 1
|
||||
{ _: [], 'test-field': 1, testField: 1 }
|
||||
```
|
||||
|
||||
### strip dashed
|
||||
|
||||
* default: `false`
|
||||
* key: `strip-dashed`
|
||||
|
||||
Should dashed keys be removed before returning results? This option has no effect if
|
||||
`camel-case-expansion` is disabled.
|
||||
|
||||
_If disabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --test-field 1
|
||||
{ _: [], 'test-field': 1, testField: 1 }
|
||||
```
|
||||
|
||||
_If enabled:_
|
||||
|
||||
```console
|
||||
$ node example.js --test-field 1
|
||||
{ _: [], testField: 1 }
|
||||
```
|
||||
|
||||
### unknown options as args
|
||||
|
||||
* default: `false`
|
||||
* key: `unknown-options-as-args`
|
||||
|
||||
Should unknown options be treated like regular arguments? An unknown option is one that is not
|
||||
configured in `opts`.
|
||||
|
||||
_If disabled_
|
||||
|
||||
```console
|
||||
$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
|
||||
{ _: [], unknownOption: true, knownOption: 2, stringOption: '', unknownOption2: true }
|
||||
```
|
||||
|
||||
_If enabled_
|
||||
|
||||
```console
|
||||
$ node example.js --unknown-option --known-option 2 --string-option --unknown-option2
|
||||
{ _: ['--unknown-option'], knownOption: 2, stringOption: '--unknown-option2' }
|
||||
```
|
||||
|
||||
## Supported Node.js Versions
|
||||
|
||||
Libraries in this ecosystem make a best effort to track
|
||||
[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a
|
||||
post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
|
||||
|
||||
## Special Thanks
|
||||
|
||||
The yargs project evolves from optimist and minimist. It owes its
|
||||
existence to a lot of James Halliday's hard work. Thanks [substack](https://github.com/substack) **beep** **boop** \o/
|
||||
|
||||
## License
|
||||
|
||||
ISC
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/util/isPromise"));
|
||||
//# sourceMappingURL=isPromise.js.map
|
||||
@@ -0,0 +1,27 @@
|
||||
let nextHandle = 1;
|
||||
const RESOLVED = (() => Promise.resolve())();
|
||||
const activeHandles = {};
|
||||
function findAndClearHandle(handle) {
|
||||
if (handle in activeHandles) {
|
||||
delete activeHandles[handle];
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
export const Immediate = {
|
||||
setImmediate(cb) {
|
||||
const handle = nextHandle++;
|
||||
activeHandles[handle] = true;
|
||||
RESOLVED.then(() => findAndClearHandle(handle) && cb());
|
||||
return handle;
|
||||
},
|
||||
clearImmediate(handle) {
|
||||
findAndClearHandle(handle);
|
||||
},
|
||||
};
|
||||
export const TestTools = {
|
||||
pending() {
|
||||
return Object.keys(activeHandles).length;
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=Immediate.js.map
|
||||
@@ -0,0 +1,17 @@
|
||||
export interface AnimationConfig {
|
||||
delay?: number;
|
||||
duration?: number;
|
||||
easing?: (t: number) => number;
|
||||
css?: (t: number, u: number) => string;
|
||||
tick?: (t: number, u: number) => void;
|
||||
}
|
||||
interface FlipParams {
|
||||
delay?: number;
|
||||
duration?: number | ((len: number) => number);
|
||||
easing?: (t: number) => number;
|
||||
}
|
||||
export declare function flip(node: Element, animation: {
|
||||
from: DOMRect;
|
||||
to: DOMRect;
|
||||
}, params?: FlipParams): AnimationConfig;
|
||||
export {};
|
||||
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
function __export(m) {
|
||||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("rxjs-compat/operator/partition"));
|
||||
//# sourceMappingURL=partition.js.map
|
||||
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = isBtcAddress;
|
||||
|
||||
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// supports Bech32 addresses
|
||||
var btc = /^(bc1|[13])[a-zA-HJ-NP-Z0-9]{25,39}$/;
|
||||
|
||||
function isBtcAddress(str) {
|
||||
(0, _assertString.default)(str);
|
||||
return btc.test(str);
|
||||
}
|
||||
|
||||
module.exports = exports.default;
|
||||
module.exports.default = exports.default;
|
||||
@@ -0,0 +1,2 @@
|
||||
/* eslint-env browser */
|
||||
module.exports = typeof self == 'object' ? self.FormData : window.FormData;
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Scheduler } from '../Scheduler';
|
||||
import { SubscriptionLog } from './SubscriptionLog';
|
||||
export declare class SubscriptionLoggable {
|
||||
subscriptions: SubscriptionLog[];
|
||||
scheduler: Scheduler;
|
||||
logSubscribedFrame(): number;
|
||||
logUnsubscribedFrame(index: number): void;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J E F G BC"},B:{"1":"C K L H M N O P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t"},C:{"1":"0 1 2 3 4 5 6 7 8 9 tB I u J E F G A B C K L H M N O v w 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 e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB DC EC","2":"CC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 F G A B C K L H M N O v w 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 e lB mB nB oB pB P Q R S T U V W X Y Z a b c d f g h i j k l m n o p q r s D t xB yB FC","2":"I","4":"u J E"},E:{"1":"J E F G A B C K L H IC JC KC 0B qB rB 1B LC MC 2B 3B 4B 5B sB 6B 7B 8B NC","2":"I u GC zB HC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G B C H M N O v w 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 e lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d OC PC QC RC qB 9B SC rB"},G:{"1":"F VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC 2B 3B 4B 5B sB 6B 7B 8B","2":"zB TC AC UC"},H:{"1":"nC"},I:{"1":"D sC tC","2":"tB I oC pC qC rC AC"},J:{"1":"A","2":"E"},K:{"1":"A B C e qB 9B rB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"uC"},P:{"1":"I vC wC xC yC zC 0B 0C 1C 2C 3C 4C sB 5C 6C 7C"},Q:{"1":"1B"},R:{"1":"8C"},S:{"1":"9C"}},B:2,C:"SVG filters"};
|
||||
Reference in New Issue
Block a user