new license file version [CI SKIP]
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function isTLSSocket(socket) {
|
||||
return socket.encrypted;
|
||||
}
|
||||
const deferToConnect = (socket, fn) => {
|
||||
let listeners;
|
||||
if (typeof fn === 'function') {
|
||||
const connect = fn;
|
||||
listeners = { connect };
|
||||
}
|
||||
else {
|
||||
listeners = fn;
|
||||
}
|
||||
const hasConnectListener = typeof listeners.connect === 'function';
|
||||
const hasSecureConnectListener = typeof listeners.secureConnect === 'function';
|
||||
const hasCloseListener = typeof listeners.close === 'function';
|
||||
const onConnect = () => {
|
||||
if (hasConnectListener) {
|
||||
listeners.connect();
|
||||
}
|
||||
if (isTLSSocket(socket) && hasSecureConnectListener) {
|
||||
if (socket.authorized) {
|
||||
listeners.secureConnect();
|
||||
}
|
||||
else if (!socket.authorizationError) {
|
||||
socket.once('secureConnect', listeners.secureConnect);
|
||||
}
|
||||
}
|
||||
if (hasCloseListener) {
|
||||
socket.once('close', listeners.close);
|
||||
}
|
||||
};
|
||||
if (socket.writable && !socket.connecting) {
|
||||
onConnect();
|
||||
}
|
||||
else if (socket.connecting) {
|
||||
socket.once('connect', onConnect);
|
||||
}
|
||||
else if (socket.destroyed && hasCloseListener) {
|
||||
listeners.close(socket._hadError);
|
||||
}
|
||||
};
|
||||
exports.default = deferToConnect;
|
||||
// For CommonJS default export support
|
||||
module.exports = deferToConnect;
|
||||
module.exports.default = deferToConnect;
|
||||
@@ -0,0 +1,58 @@
|
||||
var test = require('tape');
|
||||
var v = require('es-value-fixtures');
|
||||
var forEach = require('for-each');
|
||||
|
||||
var inspect = require('../');
|
||||
|
||||
test('negative zero', function (t) {
|
||||
t.equal(inspect(0), '0', 'inspect(0) === "0"');
|
||||
t.equal(inspect(Object(0)), 'Object(0)', 'inspect(Object(0)) === "Object(0)"');
|
||||
|
||||
t.equal(inspect(-0), '-0', 'inspect(-0) === "-0"');
|
||||
t.equal(inspect(Object(-0)), 'Object(-0)', 'inspect(Object(-0)) === "Object(-0)"');
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
test('numericSeparator', function (t) {
|
||||
forEach(v.nonBooleans, function (nonBoolean) {
|
||||
t['throws'](
|
||||
function () { inspect(true, { numericSeparator: nonBoolean }); },
|
||||
TypeError,
|
||||
inspect(nonBoolean) + ' is not a boolean'
|
||||
);
|
||||
});
|
||||
|
||||
t.test('3 digit numbers', function (st) {
|
||||
var failed = false;
|
||||
for (var i = -999; i < 1000; i += 1) {
|
||||
var actual = inspect(i);
|
||||
var actualSepNo = inspect(i, { numericSeparator: false });
|
||||
var actualSepYes = inspect(i, { numericSeparator: true });
|
||||
var expected = String(i);
|
||||
if (actual !== expected || actualSepNo !== expected || actualSepYes !== expected) {
|
||||
failed = true;
|
||||
t.equal(actual, expected);
|
||||
t.equal(actualSepNo, expected);
|
||||
t.equal(actualSepYes, expected);
|
||||
}
|
||||
}
|
||||
|
||||
st.notOk(failed, 'all 3 digit numbers passed');
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.equal(inspect(1e3), '1000', '1000');
|
||||
t.equal(inspect(1e3, { numericSeparator: false }), '1000', '1000, numericSeparator false');
|
||||
t.equal(inspect(1e3, { numericSeparator: true }), '1_000', '1000, numericSeparator true');
|
||||
t.equal(inspect(-1e3), '-1000', '-1000');
|
||||
t.equal(inspect(-1e3, { numericSeparator: false }), '-1000', '-1000, numericSeparator false');
|
||||
t.equal(inspect(-1e3, { numericSeparator: true }), '-1_000', '-1000, numericSeparator true');
|
||||
|
||||
t.equal(inspect(1234.5678, { numericSeparator: true }), '1_234.567_8', 'fractional numbers get separators');
|
||||
t.equal(inspect(1234.56789, { numericSeparator: true }), '1_234.567_89', 'fractional numbers get separators');
|
||||
t.equal(inspect(1234.567891, { numericSeparator: true }), '1_234.567_891', 'fractional numbers get separators');
|
||||
|
||||
t.end();
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
// This is CommonJS because lie is an external dependency, so Rollup
|
||||
// can just ignore it.
|
||||
if (typeof Promise === 'undefined') {
|
||||
// In the "nopromises" build this will just throw if you don't have
|
||||
// a global promise object, but it would throw anyway later.
|
||||
require('lie/polyfill');
|
||||
}
|
||||
export default Promise;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"auto-changelog","version":"2.4.0","files":{"templates/compact.hbs":{"checkedAt":1678883673335,"integrity":"sha512-h7TW43PpiNN6C2OBVI+WJsdGKEk+tBlbuRoDeGpofvbfljTWy9STjduaaApL4pgEsQ12Gb/otTalYGlLLBBmxg==","mode":420,"size":923},"templates/json.hbs":{"checkedAt":1678883673335,"integrity":"sha512-ksWN+G1AmFNWJ4mKOgCi3M1wr4yzA7GDzLyE7AkHdhiQIbGPTEvG1M8Hpaaw9VRFUSH5US2F6DBexFEib1MbqA==","mode":420,"size":18},"templates/keepachangelog.hbs":{"checkedAt":1678883673335,"integrity":"sha512-jayWzuC68CmcR5yQIuUdoXzU3HhTelyWbrlyLkHGxDA8lSeKyFblNf6PM+8EqHfa5rcTTbXHU4Jet+5JKd2dSA==","mode":420,"size":1184},"src/commits.js":{"checkedAt":1678883673335,"integrity":"sha512-tuGgf17Bua4zQhT6973UNN2eMTjJtZbbUc8eAP+8ta7p1Bc9ikkD8TV1pI596oxGbUOB7PVAdGOR5vARPFUWZw==","mode":420,"size":4560},"src/index.js":{"checkedAt":1678883673335,"integrity":"sha512-Uvfx3y+TiuXmE9NrbO/9LisBk1+wQafuP453veFWU8NZofd9hhT2Jybjd1k7A5Cna2N4a7Yc0UNWTVY61ltJTQ==","mode":493,"size":154},"src/releases.js":{"checkedAt":1678883673335,"integrity":"sha512-ZJf7lroDdNgKgvm7Oyzza5IJY2Ewc6BXQ9Ob/OCIGhmw+70yIw4L3yaxK/rK/46pJukkCvBi7tbxmv9uWwGEnw==","mode":420,"size":2999},"src/run.js":{"checkedAt":1678883673336,"integrity":"sha512-67bEbwwdhcOI5/RT7cidDvVJOCfl3FsZ7xTj1AVkkzw5I3Ri0Zc70HYO5pSw9gv/BatM4Cmk+veKRxFV0cptUA==","mode":420,"size":5852},"src/tags.js":{"checkedAt":1678883673336,"integrity":"sha512-Q2QUkV0H9xYB/e1mqz4dvIF0EWAKCWEoaBqOWmGW0VLLuoZwd6Emj0yct6W41H9x4USFrs3QzXvTKMkgDMsC3Q==","mode":420,"size":3655},"src/remote.js":{"checkedAt":1678883673336,"integrity":"sha512-wAkKE1L7akU5xAh5WIVa+4yG0EYpUz8rTk/A/CTd4FSYlBV5By8oFtXD28WRMK5reMOmW5z6iV9/J/Nlid5hSQ==","mode":420,"size":3375},"src/template.js":{"checkedAt":1678883673337,"integrity":"sha512-EZ725ANYEIlmuoclEcOCa+5ASbApEbP5X5zElal2fJ4qFRvabZLACOqtxWRR+1Qcu41h/hdDSAxNyXbiAbij9Q==","mode":420,"size":2685},"src/utils.js":{"checkedAt":1678883673337,"integrity":"sha512-lxXRYUtyNQ3q8CepXcl704vi0R9mE4ITHvd18UhQYYMKmnNv91s8k2tA0pnFqbG0cktG23h6MkAU1SEEPuS6Iw==","mode":420,"size":2750},"package.json":{"checkedAt":1678883673337,"integrity":"sha512-twc5ndNFrjKzgIPnvgqNOXrxHpNJpFxNo/WptsBSE8qdWQQZGCHxzfpfyaarpk8Bi0Ozq6Px24Z8ARB0Olx+HQ==","mode":420,"size":2477},"CHANGELOG.md":{"checkedAt":1678883673337,"integrity":"sha512-OplR5d9whetwVzVfqWa2dpGFxPF4fvo99BLC1Flw7QP8QAhapIsiQBLlGOUgfZtzqef/A3GBLTYvDIKNWrPytQ==","mode":420,"size":31178},"LICENSE.md":{"checkedAt":1678883673337,"integrity":"sha512-dqy0Hxr41se/yDEMx/5vsa8aD/f61xc+ehg+l7EPWioEBfXA2IDB+rNF2AK3DoX8nil7lGRdnntmTG0gaHW0yA==","mode":420,"size":1091},"CONTRIBUTING.md":{"checkedAt":1678883673337,"integrity":"sha512-I+N7RQ4mklc9CAlr5vmHQLHJv0jkWQpWGQhxpn30HJlww6Cy3MZXlch96Ju5tmEDd8uIWDX/hQRU5C1M/23GVg==","mode":420,"size":922},"README.md":{"checkedAt":1678883673337,"integrity":"sha512-Pe54yo5SXaV4aydUAyNHOEYC04xAqOBpCcgpO0MFzcz2apeI9uP0tq0JVVBWALfzYWL91lbAb5RBXg5rMpf3yw==","mode":420,"size":13277}}}
|
||||
@@ -0,0 +1,38 @@
|
||||
var baseGetTag = require('./_baseGetTag'),
|
||||
isObjectLike = require('./isObjectLike');
|
||||
|
||||
/** `Object#toString` result references. */
|
||||
var numberTag = '[object Number]';
|
||||
|
||||
/**
|
||||
* Checks if `value` is classified as a `Number` primitive or object.
|
||||
*
|
||||
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
|
||||
* classified as numbers, use the `_.isFinite` method.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 0.1.0
|
||||
* @category Lang
|
||||
* @param {*} value The value to check.
|
||||
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
|
||||
* @example
|
||||
*
|
||||
* _.isNumber(3);
|
||||
* // => true
|
||||
*
|
||||
* _.isNumber(Number.MIN_VALUE);
|
||||
* // => true
|
||||
*
|
||||
* _.isNumber(Infinity);
|
||||
* // => true
|
||||
*
|
||||
* _.isNumber('3');
|
||||
* // => false
|
||||
*/
|
||||
function isNumber(value) {
|
||||
return typeof value == 'number' ||
|
||||
(isObjectLike(value) && baseGetTag(value) == numberTag);
|
||||
}
|
||||
|
||||
module.exports = isNumber;
|
||||
@@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
var __read = (this && this.__read) || function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
||||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
||||
to[j] = from[i];
|
||||
return to;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.combineLatestWith = void 0;
|
||||
var combineLatest_1 = require("./combineLatest");
|
||||
function combineLatestWith() {
|
||||
var otherSources = [];
|
||||
for (var _i = 0; _i < arguments.length; _i++) {
|
||||
otherSources[_i] = arguments[_i];
|
||||
}
|
||||
return combineLatest_1.combineLatest.apply(void 0, __spreadArray([], __read(otherSources)));
|
||||
}
|
||||
exports.combineLatestWith = combineLatestWith;
|
||||
//# sourceMappingURL=combineLatestWith.js.map
|
||||
@@ -0,0 +1,69 @@
|
||||
import { Observable } from '../Observable';
|
||||
import { ConnectableObservable } from '../observable/ConnectableObservable';
|
||||
import { UnaryFunction } from '../types';
|
||||
/**
|
||||
* Returns a connectable observable sequence that shares a single subscription to the
|
||||
* underlying sequence containing only the last notification.
|
||||
*
|
||||
* 
|
||||
*
|
||||
* Similar to {@link publish}, but it waits until the source observable completes and stores
|
||||
* the last emitted value.
|
||||
* Similarly to {@link publishReplay} and {@link publishBehavior}, this keeps storing the last
|
||||
* value even if it has no more subscribers. If subsequent subscriptions happen, they will
|
||||
* immediately get that last stored value and complete.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* ```ts
|
||||
* import { ConnectableObservable, interval, publishLast, tap, take } from 'rxjs';
|
||||
*
|
||||
* const connectable = <ConnectableObservable<number>>interval(1000)
|
||||
* .pipe(
|
||||
* tap(x => console.log('side effect', x)),
|
||||
* take(3),
|
||||
* publishLast()
|
||||
* );
|
||||
*
|
||||
* connectable.subscribe({
|
||||
* next: x => console.log('Sub. A', x),
|
||||
* error: err => console.log('Sub. A Error', err),
|
||||
* complete: () => console.log('Sub. A Complete')
|
||||
* });
|
||||
*
|
||||
* connectable.subscribe({
|
||||
* next: x => console.log('Sub. B', x),
|
||||
* error: err => console.log('Sub. B Error', err),
|
||||
* complete: () => console.log('Sub. B Complete')
|
||||
* });
|
||||
*
|
||||
* connectable.connect();
|
||||
*
|
||||
* // Results:
|
||||
* // 'side effect 0' - after one second
|
||||
* // 'side effect 1' - after two seconds
|
||||
* // 'side effect 2' - after three seconds
|
||||
* // 'Sub. A 2' - immediately after 'side effect 2'
|
||||
* // 'Sub. B 2'
|
||||
* // 'Sub. A Complete'
|
||||
* // 'Sub. B Complete'
|
||||
* ```
|
||||
*
|
||||
* @see {@link ConnectableObservable}
|
||||
* @see {@link publish}
|
||||
* @see {@link publishReplay}
|
||||
* @see {@link publishBehavior}
|
||||
*
|
||||
* @return A function that returns an Observable that emits elements of a
|
||||
* sequence produced by multicasting the source sequence.
|
||||
* @deprecated Will be removed in v8. To create a connectable observable with an
|
||||
* {@link AsyncSubject} under the hood, use {@link connectable}.
|
||||
* `source.pipe(publishLast())` is equivalent to
|
||||
* `connectable(source, { connector: () => new AsyncSubject(), resetOnDisconnect: false })`.
|
||||
* If you're using {@link refCount} after `publishLast`, use the {@link share} operator instead.
|
||||
* `source.pipe(publishLast(), refCount())` is equivalent to
|
||||
* `source.pipe(share({ connector: () => new AsyncSubject(), resetOnError: false, resetOnComplete: false, resetOnRefCountZero: false }))`.
|
||||
* Details: https://rxjs.dev/deprecations/multicasting
|
||||
*/
|
||||
export declare function publishLast<T>(): UnaryFunction<Observable<T>, ConnectableObservable<T>>;
|
||||
//# sourceMappingURL=publishLast.d.ts.map
|
||||
@@ -0,0 +1,33 @@
|
||||
var arrayMap = require('./_arrayMap'),
|
||||
copyArray = require('./_copyArray'),
|
||||
isArray = require('./isArray'),
|
||||
isSymbol = require('./isSymbol'),
|
||||
stringToPath = require('./_stringToPath'),
|
||||
toKey = require('./_toKey'),
|
||||
toString = require('./toString');
|
||||
|
||||
/**
|
||||
* Converts `value` to a property path array.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 4.0.0
|
||||
* @category Util
|
||||
* @param {*} value The value to convert.
|
||||
* @returns {Array} Returns the new property path array.
|
||||
* @example
|
||||
*
|
||||
* _.toPath('a.b.c');
|
||||
* // => ['a', 'b', 'c']
|
||||
*
|
||||
* _.toPath('a[0].b.c');
|
||||
* // => ['a', '0', 'b', 'c']
|
||||
*/
|
||||
function toPath(value) {
|
||||
if (isArray(value)) {
|
||||
return arrayMap(value, toKey);
|
||||
}
|
||||
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
|
||||
}
|
||||
|
||||
module.exports = toPath;
|
||||
@@ -0,0 +1,250 @@
|
||||
/***********************************************************************
|
||||
|
||||
A JavaScript tokenizer / parser / beautifier / compressor.
|
||||
https://github.com/mishoo/UglifyJS
|
||||
|
||||
-------------------------------- (C) ---------------------------------
|
||||
|
||||
Author: Mihai Bazon
|
||||
<mihai.bazon@gmail.com>
|
||||
http://mihai.bazon.net/blog
|
||||
|
||||
Distributed under the BSD license:
|
||||
|
||||
Copyright 2012 (c) Mihai Bazon <mihai.bazon@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
* Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY
|
||||
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
||||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
||||
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
***********************************************************************/
|
||||
|
||||
"use strict";
|
||||
|
||||
function TreeTransformer(before, after) {
|
||||
TreeWalker.call(this);
|
||||
this.before = before;
|
||||
this.after = after;
|
||||
}
|
||||
TreeTransformer.prototype = new TreeWalker;
|
||||
|
||||
(function(DEF) {
|
||||
function do_list(list, tw) {
|
||||
return List(list, function(node) {
|
||||
return node.transform(tw, true);
|
||||
});
|
||||
}
|
||||
|
||||
DEF(AST_Node, noop);
|
||||
DEF(AST_LabeledStatement, function(self, tw) {
|
||||
self.label = self.label.transform(tw);
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_SimpleStatement, function(self, tw) {
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_Block, function(self, tw) {
|
||||
self.body = do_list(self.body, tw);
|
||||
});
|
||||
DEF(AST_Do, function(self, tw) {
|
||||
self.body = self.body.transform(tw);
|
||||
self.condition = self.condition.transform(tw);
|
||||
});
|
||||
DEF(AST_While, function(self, tw) {
|
||||
self.condition = self.condition.transform(tw);
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_For, function(self, tw) {
|
||||
if (self.init) self.init = self.init.transform(tw);
|
||||
if (self.condition) self.condition = self.condition.transform(tw);
|
||||
if (self.step) self.step = self.step.transform(tw);
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_ForEnumeration, function(self, tw) {
|
||||
self.init = self.init.transform(tw);
|
||||
self.object = self.object.transform(tw);
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_With, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_Exit, function(self, tw) {
|
||||
if (self.value) self.value = self.value.transform(tw);
|
||||
});
|
||||
DEF(AST_LoopControl, function(self, tw) {
|
||||
if (self.label) self.label = self.label.transform(tw);
|
||||
});
|
||||
DEF(AST_If, function(self, tw) {
|
||||
self.condition = self.condition.transform(tw);
|
||||
self.body = self.body.transform(tw);
|
||||
if (self.alternative) self.alternative = self.alternative.transform(tw);
|
||||
});
|
||||
DEF(AST_Switch, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
self.body = do_list(self.body, tw);
|
||||
});
|
||||
DEF(AST_Case, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
self.body = do_list(self.body, tw);
|
||||
});
|
||||
DEF(AST_Try, function(self, tw) {
|
||||
self.body = do_list(self.body, tw);
|
||||
if (self.bcatch) self.bcatch = self.bcatch.transform(tw);
|
||||
if (self.bfinally) self.bfinally = self.bfinally.transform(tw);
|
||||
});
|
||||
DEF(AST_Catch, function(self, tw) {
|
||||
if (self.argname) self.argname = self.argname.transform(tw);
|
||||
self.body = do_list(self.body, tw);
|
||||
});
|
||||
DEF(AST_Definitions, function(self, tw) {
|
||||
self.definitions = do_list(self.definitions, tw);
|
||||
});
|
||||
DEF(AST_VarDef, function(self, tw) {
|
||||
self.name = self.name.transform(tw);
|
||||
if (self.value) self.value = self.value.transform(tw);
|
||||
});
|
||||
DEF(AST_DefaultValue, function(self, tw) {
|
||||
self.name = self.name.transform(tw);
|
||||
self.value = self.value.transform(tw);
|
||||
});
|
||||
DEF(AST_Lambda, function(self, tw) {
|
||||
if (self.name) self.name = self.name.transform(tw);
|
||||
self.argnames = do_list(self.argnames, tw);
|
||||
if (self.rest) self.rest = self.rest.transform(tw);
|
||||
self.body = do_list(self.body, tw);
|
||||
});
|
||||
function transform_arrow(self, tw) {
|
||||
self.argnames = do_list(self.argnames, tw);
|
||||
if (self.rest) self.rest = self.rest.transform(tw);
|
||||
if (self.value) {
|
||||
self.value = self.value.transform(tw);
|
||||
} else {
|
||||
self.body = do_list(self.body, tw);
|
||||
}
|
||||
}
|
||||
DEF(AST_Arrow, transform_arrow);
|
||||
DEF(AST_AsyncArrow, transform_arrow);
|
||||
DEF(AST_Class, function(self, tw) {
|
||||
if (self.name) self.name = self.name.transform(tw);
|
||||
if (self.extends) self.extends = self.extends.transform(tw);
|
||||
self.properties = do_list(self.properties, tw);
|
||||
});
|
||||
DEF(AST_ClassProperty, function(self, tw) {
|
||||
if (self.key instanceof AST_Node) self.key = self.key.transform(tw);
|
||||
if (self.value) self.value = self.value.transform(tw);
|
||||
});
|
||||
DEF(AST_Call, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
self.args = do_list(self.args, tw);
|
||||
});
|
||||
DEF(AST_Sequence, function(self, tw) {
|
||||
self.expressions = do_list(self.expressions, tw);
|
||||
});
|
||||
DEF(AST_Await, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
});
|
||||
DEF(AST_Yield, function(self, tw) {
|
||||
if (self.expression) self.expression = self.expression.transform(tw);
|
||||
});
|
||||
DEF(AST_Dot, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
});
|
||||
DEF(AST_Sub, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
self.property = self.property.transform(tw);
|
||||
});
|
||||
DEF(AST_Spread, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
});
|
||||
DEF(AST_Unary, function(self, tw) {
|
||||
self.expression = self.expression.transform(tw);
|
||||
});
|
||||
DEF(AST_Binary, function(self, tw) {
|
||||
self.left = self.left.transform(tw);
|
||||
self.right = self.right.transform(tw);
|
||||
});
|
||||
DEF(AST_Conditional, function(self, tw) {
|
||||
self.condition = self.condition.transform(tw);
|
||||
self.consequent = self.consequent.transform(tw);
|
||||
self.alternative = self.alternative.transform(tw);
|
||||
});
|
||||
DEF(AST_Array, function(self, tw) {
|
||||
self.elements = do_list(self.elements, tw);
|
||||
});
|
||||
DEF(AST_DestructuredArray, function(self, tw) {
|
||||
self.elements = do_list(self.elements, tw);
|
||||
if (self.rest) self.rest = self.rest.transform(tw);
|
||||
});
|
||||
DEF(AST_DestructuredKeyVal, function(self, tw) {
|
||||
if (self.key instanceof AST_Node) self.key = self.key.transform(tw);
|
||||
self.value = self.value.transform(tw);
|
||||
});
|
||||
DEF(AST_DestructuredObject, function(self, tw) {
|
||||
self.properties = do_list(self.properties, tw);
|
||||
if (self.rest) self.rest = self.rest.transform(tw);
|
||||
});
|
||||
DEF(AST_Object, function(self, tw) {
|
||||
self.properties = do_list(self.properties, tw);
|
||||
});
|
||||
DEF(AST_ObjectProperty, function(self, tw) {
|
||||
if (self.key instanceof AST_Node) self.key = self.key.transform(tw);
|
||||
self.value = self.value.transform(tw);
|
||||
});
|
||||
DEF(AST_ExportDeclaration, function(self, tw) {
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_ExportDefault, function(self, tw) {
|
||||
self.body = self.body.transform(tw);
|
||||
});
|
||||
DEF(AST_ExportReferences, function(self, tw) {
|
||||
self.properties = do_list(self.properties, tw);
|
||||
});
|
||||
DEF(AST_Import, function(self, tw) {
|
||||
if (self.all) self.all = self.all.transform(tw);
|
||||
if (self.default) self.default = self.default.transform(tw);
|
||||
if (self.properties) self.properties = do_list(self.properties, tw);
|
||||
});
|
||||
DEF(AST_Template, function(self, tw) {
|
||||
if (self.tag) self.tag = self.tag.transform(tw);
|
||||
self.expressions = do_list(self.expressions, tw);
|
||||
});
|
||||
})(function(node, descend) {
|
||||
node.DEFMETHOD("transform", function(tw, in_list) {
|
||||
var x, y;
|
||||
tw.push(this);
|
||||
if (tw.before) x = tw.before(this, descend, in_list);
|
||||
if (typeof x === "undefined") {
|
||||
x = this;
|
||||
descend(x, tw);
|
||||
if (tw.after) {
|
||||
y = tw.after(x, in_list);
|
||||
if (typeof y !== "undefined") x = y;
|
||||
}
|
||||
}
|
||||
tw.pop();
|
||||
return x;
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/stop-iteration-iterator
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').findSeries;
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"author": {
|
||||
"name": "Patrik Simek",
|
||||
"url": "https://patriksimek.cz"
|
||||
},
|
||||
"name": "vm2",
|
||||
"description": "vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Securely!",
|
||||
"keywords": [
|
||||
"sandbox",
|
||||
"prison",
|
||||
"jail",
|
||||
"vm",
|
||||
"alcatraz",
|
||||
"contextify"
|
||||
],
|
||||
"version": "3.9.14",
|
||||
"main": "index.js",
|
||||
"sideEffects": false,
|
||||
"repository": "github:patriksimek/vm2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"acorn": "^8.7.0",
|
||||
"acorn-walk": "^8.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^5.16.0",
|
||||
"eslint-config-integromat": "^1.5.0",
|
||||
"mocha": "^6.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha test",
|
||||
"pretest": "eslint ."
|
||||
},
|
||||
"bin": {
|
||||
"vm2": "./bin/vm2"
|
||||
},
|
||||
"types": "index.d.ts"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var Type = require('../Type');
|
||||
var BigIntEqual = require('./equal');
|
||||
|
||||
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-sameValueZero
|
||||
|
||||
module.exports = function BigIntSameValueZero(x, y) {
|
||||
if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
|
||||
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
|
||||
}
|
||||
|
||||
return BigIntEqual(x, y);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
|
||||
function parseHost(urlObj, options)
|
||||
{
|
||||
// TWEAK :: condition only for speed optimization
|
||||
if (options.ignore_www)
|
||||
{
|
||||
var host = urlObj.host.full;
|
||||
|
||||
if (host)
|
||||
{
|
||||
var stripped = host;
|
||||
|
||||
if (host.indexOf("www.") === 0)
|
||||
{
|
||||
stripped = host.substr(4);
|
||||
}
|
||||
|
||||
urlObj.host.stripped = stripped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = parseHost;
|
||||
@@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) Gregor Martynus and contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
const flagSymbol = Symbol('arg flag');
|
||||
|
||||
class ArgError extends Error {
|
||||
constructor(msg, code) {
|
||||
super(msg);
|
||||
this.name = 'ArgError';
|
||||
this.code = code;
|
||||
|
||||
Object.setPrototypeOf(this, ArgError.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
function arg(
|
||||
opts,
|
||||
{
|
||||
argv = process.argv.slice(2),
|
||||
permissive = false,
|
||||
stopAtPositional = false
|
||||
} = {}
|
||||
) {
|
||||
if (!opts) {
|
||||
throw new ArgError(
|
||||
'argument specification object is required',
|
||||
'ARG_CONFIG_NO_SPEC'
|
||||
);
|
||||
}
|
||||
|
||||
const result = { _: [] };
|
||||
|
||||
const aliases = {};
|
||||
const handlers = {};
|
||||
|
||||
for (const key of Object.keys(opts)) {
|
||||
if (!key) {
|
||||
throw new ArgError(
|
||||
'argument key cannot be an empty string',
|
||||
'ARG_CONFIG_EMPTY_KEY'
|
||||
);
|
||||
}
|
||||
|
||||
if (key[0] !== '-') {
|
||||
throw new ArgError(
|
||||
`argument key must start with '-' but found: '${key}'`,
|
||||
'ARG_CONFIG_NONOPT_KEY'
|
||||
);
|
||||
}
|
||||
|
||||
if (key.length === 1) {
|
||||
throw new ArgError(
|
||||
`argument key must have a name; singular '-' keys are not allowed: ${key}`,
|
||||
'ARG_CONFIG_NONAME_KEY'
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof opts[key] === 'string') {
|
||||
aliases[key] = opts[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
let type = opts[key];
|
||||
let isFlag = false;
|
||||
|
||||
if (
|
||||
Array.isArray(type) &&
|
||||
type.length === 1 &&
|
||||
typeof type[0] === 'function'
|
||||
) {
|
||||
const [fn] = type;
|
||||
type = (value, name, prev = []) => {
|
||||
prev.push(fn(value, name, prev[prev.length - 1]));
|
||||
return prev;
|
||||
};
|
||||
isFlag = fn === Boolean || fn[flagSymbol] === true;
|
||||
} else if (typeof type === 'function') {
|
||||
isFlag = type === Boolean || type[flagSymbol] === true;
|
||||
} else {
|
||||
throw new ArgError(
|
||||
`type missing or not a function or valid array type: ${key}`,
|
||||
'ARG_CONFIG_VAD_TYPE'
|
||||
);
|
||||
}
|
||||
|
||||
if (key[1] !== '-' && key.length > 2) {
|
||||
throw new ArgError(
|
||||
`short argument keys (with a single hyphen) must have only one character: ${key}`,
|
||||
'ARG_CONFIG_SHORTOPT_TOOLONG'
|
||||
);
|
||||
}
|
||||
|
||||
handlers[key] = [type, isFlag];
|
||||
}
|
||||
|
||||
for (let i = 0, len = argv.length; i < len; i++) {
|
||||
const wholeArg = argv[i];
|
||||
|
||||
if (stopAtPositional && result._.length > 0) {
|
||||
result._ = result._.concat(argv.slice(i));
|
||||
break;
|
||||
}
|
||||
|
||||
if (wholeArg === '--') {
|
||||
result._ = result._.concat(argv.slice(i + 1));
|
||||
break;
|
||||
}
|
||||
|
||||
if (wholeArg.length > 1 && wholeArg[0] === '-') {
|
||||
/* eslint-disable operator-linebreak */
|
||||
const separatedArguments =
|
||||
wholeArg[1] === '-' || wholeArg.length === 2
|
||||
? [wholeArg]
|
||||
: wholeArg
|
||||
.slice(1)
|
||||
.split('')
|
||||
.map((a) => `-${a}`);
|
||||
/* eslint-enable operator-linebreak */
|
||||
|
||||
for (let j = 0; j < separatedArguments.length; j++) {
|
||||
const arg = separatedArguments[j];
|
||||
const [originalArgName, argStr] =
|
||||
arg[1] === '-' ? arg.split(/=(.*)/, 2) : [arg, undefined];
|
||||
|
||||
let argName = originalArgName;
|
||||
while (argName in aliases) {
|
||||
argName = aliases[argName];
|
||||
}
|
||||
|
||||
if (!(argName in handlers)) {
|
||||
if (permissive) {
|
||||
result._.push(arg);
|
||||
continue;
|
||||
} else {
|
||||
throw new ArgError(
|
||||
`unknown or unexpected option: ${originalArgName}`,
|
||||
'ARG_UNKNOWN_OPTION'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const [type, isFlag] = handlers[argName];
|
||||
|
||||
if (!isFlag && j + 1 < separatedArguments.length) {
|
||||
throw new ArgError(
|
||||
`option requires argument (but was followed by another short argument): ${originalArgName}`,
|
||||
'ARG_MISSING_REQUIRED_SHORTARG'
|
||||
);
|
||||
}
|
||||
|
||||
if (isFlag) {
|
||||
result[argName] = type(true, argName, result[argName]);
|
||||
} else if (argStr === undefined) {
|
||||
if (
|
||||
argv.length < i + 2 ||
|
||||
(argv[i + 1].length > 1 &&
|
||||
argv[i + 1][0] === '-' &&
|
||||
!(
|
||||
argv[i + 1].match(/^-?\d*(\.(?=\d))?\d*$/) &&
|
||||
(type === Number ||
|
||||
// eslint-disable-next-line no-undef
|
||||
(typeof BigInt !== 'undefined' && type === BigInt))
|
||||
))
|
||||
) {
|
||||
const extended =
|
||||
originalArgName === argName ? '' : ` (alias for ${argName})`;
|
||||
throw new ArgError(
|
||||
`option requires argument: ${originalArgName}${extended}`,
|
||||
'ARG_MISSING_REQUIRED_LONGARG'
|
||||
);
|
||||
}
|
||||
|
||||
result[argName] = type(argv[i + 1], argName, result[argName]);
|
||||
++i;
|
||||
} else {
|
||||
result[argName] = type(argStr, argName, result[argName]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result._.push(wholeArg);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
arg.flag = (fn) => {
|
||||
fn[flagSymbol] = true;
|
||||
return fn;
|
||||
};
|
||||
|
||||
// Utility types
|
||||
arg.COUNT = arg.flag((v, name, existingCount) => (existingCount || 0) + 1);
|
||||
|
||||
// Expose error class
|
||||
arg.ArgError = ArgError;
|
||||
|
||||
module.exports = arg;
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"D E F A B","2":"CC","8":"J"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"1":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"1":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"1":"oC"},I:{"1":"tB I f pC qC rC sC BC tC uC"},J:{"1":"D A"},K:{"1":"A B C h qB AC rB"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:2,C:"PNG alpha transparency"};
|
||||
@@ -0,0 +1,3 @@
|
||||
import type { Got, InstanceDefaults } from './types.js';
|
||||
declare const create: (defaults: InstanceDefaults) => Got;
|
||||
export default create;
|
||||
@@ -0,0 +1,498 @@
|
||||
import { Operator } from './Operator';
|
||||
import { SafeSubscriber, Subscriber } from './Subscriber';
|
||||
import { isSubscription, Subscription } from './Subscription';
|
||||
import { TeardownLogic, OperatorFunction, Subscribable, Observer } from './types';
|
||||
import { observable as Symbol_observable } from './symbol/observable';
|
||||
import { pipeFromArray } from './util/pipe';
|
||||
import { config } from './config';
|
||||
import { isFunction } from './util/isFunction';
|
||||
import { errorContext } from './util/errorContext';
|
||||
|
||||
/**
|
||||
* A representation of any set of values over any amount of time. This is the most basic building block
|
||||
* of RxJS.
|
||||
*
|
||||
* @class Observable<T>
|
||||
*/
|
||||
export class Observable<T> implements Subscribable<T> {
|
||||
/**
|
||||
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
|
||||
*/
|
||||
source: Observable<any> | undefined;
|
||||
|
||||
/**
|
||||
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
|
||||
*/
|
||||
operator: Operator<any, T> | undefined;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {Function} subscribe the function that is called when the Observable is
|
||||
* initially subscribed to. This function is given a Subscriber, to which new values
|
||||
* can be `next`ed, or an `error` method can be called to raise an error, or
|
||||
* `complete` can be called to notify of a successful completion.
|
||||
*/
|
||||
constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic) {
|
||||
if (subscribe) {
|
||||
this._subscribe = subscribe;
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: Since TypeScript inherits static properties too, we have to
|
||||
// fight against TypeScript here so Subject can have a different static create signature
|
||||
/**
|
||||
* Creates a new Observable by calling the Observable constructor
|
||||
* @owner Observable
|
||||
* @method create
|
||||
* @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
|
||||
* @return {Observable} a new observable
|
||||
* @nocollapse
|
||||
* @deprecated Use `new Observable()` instead. Will be removed in v8.
|
||||
*/
|
||||
static create: (...args: any[]) => any = <T>(subscribe?: (subscriber: Subscriber<T>) => TeardownLogic) => {
|
||||
return new Observable<T>(subscribe);
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a new Observable, with this Observable instance as the source, and the passed
|
||||
* operator defined as the new observable's operator.
|
||||
* @method lift
|
||||
* @param operator the operator defining the operation to take on the observable
|
||||
* @return a new observable with the Operator applied
|
||||
* @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
|
||||
* If you have implemented an operator using `lift`, it is recommended that you create an
|
||||
* operator by simply returning `new Observable()` directly. See "Creating new operators from
|
||||
* scratch" section here: https://rxjs.dev/guide/operators
|
||||
*/
|
||||
lift<R>(operator?: Operator<T, R>): Observable<R> {
|
||||
const observable = new Observable<R>();
|
||||
observable.source = this;
|
||||
observable.operator = operator;
|
||||
return observable;
|
||||
}
|
||||
|
||||
subscribe(observerOrNext?: Partial<Observer<T>> | ((value: T) => void)): Subscription;
|
||||
/** @deprecated Instead of passing separate callback arguments, use an observer argument. Signatures taking separate callback arguments will be removed in v8. Details: https://rxjs.dev/deprecations/subscribe-arguments */
|
||||
subscribe(next?: ((value: T) => void) | null, error?: ((error: any) => void) | null, complete?: (() => void) | null): Subscription;
|
||||
/**
|
||||
* Invokes an execution of an Observable and registers Observer handlers for notifications it will emit.
|
||||
*
|
||||
* <span class="informal">Use it when you have all these Observables, but still nothing is happening.</span>
|
||||
*
|
||||
* `subscribe` is not a regular operator, but a method that calls Observable's internal `subscribe` function. It
|
||||
* might be for example a function that you passed to Observable's constructor, but most of the time it is
|
||||
* a library implementation, which defines what will be emitted by an Observable, and when it be will emitted. This means
|
||||
* that calling `subscribe` is actually the moment when Observable starts its work, not when it is created, as it is often
|
||||
* the thought.
|
||||
*
|
||||
* Apart from starting the execution of an Observable, this method allows you to listen for values
|
||||
* that an Observable emits, as well as for when it completes or errors. You can achieve this in two
|
||||
* of the following ways.
|
||||
*
|
||||
* The first way is creating an object that implements {@link Observer} interface. It should have methods
|
||||
* defined by that interface, but note that it should be just a regular JavaScript object, which you can create
|
||||
* yourself in any way you want (ES6 class, classic function constructor, object literal etc.). In particular, do
|
||||
* not attempt to use any RxJS implementation details to create Observers - you don't need them. Remember also
|
||||
* that your object does not have to implement all methods. If you find yourself creating a method that doesn't
|
||||
* do anything, you can simply omit it. Note however, if the `error` method is not provided and an error happens,
|
||||
* it will be thrown asynchronously. Errors thrown asynchronously cannot be caught using `try`/`catch`. Instead,
|
||||
* use the {@link onUnhandledError} configuration option or use a runtime handler (like `window.onerror` or
|
||||
* `process.on('error)`) to be notified of unhandled errors. Because of this, it's recommended that you provide
|
||||
* an `error` method to avoid missing thrown errors.
|
||||
*
|
||||
* The second way is to give up on Observer object altogether and simply provide callback functions in place of its methods.
|
||||
* This means you can provide three functions as arguments to `subscribe`, where the first function is equivalent
|
||||
* of a `next` method, the second of an `error` method and the third of a `complete` method. Just as in case of an Observer,
|
||||
* if you do not need to listen for something, you can omit a function by passing `undefined` or `null`,
|
||||
* since `subscribe` recognizes these functions by where they were placed in function call. When it comes
|
||||
* to the `error` function, as with an Observer, if not provided, errors emitted by an Observable will be thrown asynchronously.
|
||||
*
|
||||
* You can, however, subscribe with no parameters at all. This may be the case where you're not interested in terminal events
|
||||
* and you also handled emissions internally by using operators (e.g. using `tap`).
|
||||
*
|
||||
* Whichever style of calling `subscribe` you use, in both cases it returns a Subscription object.
|
||||
* This object allows you to call `unsubscribe` on it, which in turn will stop the work that an Observable does and will clean
|
||||
* up all resources that an Observable used. Note that cancelling a subscription will not call `complete` callback
|
||||
* provided to `subscribe` function, which is reserved for a regular completion signal that comes from an Observable.
|
||||
*
|
||||
* Remember that callbacks provided to `subscribe` are not guaranteed to be called asynchronously.
|
||||
* It is an Observable itself that decides when these functions will be called. For example {@link of}
|
||||
* by default emits all its values synchronously. Always check documentation for how given Observable
|
||||
* will behave when subscribed and if its default behavior can be modified with a `scheduler`.
|
||||
*
|
||||
* #### Examples
|
||||
*
|
||||
* Subscribe with an {@link guide/observer Observer}
|
||||
*
|
||||
* ```ts
|
||||
* import { of } from 'rxjs';
|
||||
*
|
||||
* const sumObserver = {
|
||||
* sum: 0,
|
||||
* next(value) {
|
||||
* console.log('Adding: ' + value);
|
||||
* this.sum = this.sum + value;
|
||||
* },
|
||||
* error() {
|
||||
* // We actually could just remove this method,
|
||||
* // since we do not really care about errors right now.
|
||||
* },
|
||||
* complete() {
|
||||
* console.log('Sum equals: ' + this.sum);
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* of(1, 2, 3) // Synchronously emits 1, 2, 3 and then completes.
|
||||
* .subscribe(sumObserver);
|
||||
*
|
||||
* // Logs:
|
||||
* // 'Adding: 1'
|
||||
* // 'Adding: 2'
|
||||
* // 'Adding: 3'
|
||||
* // 'Sum equals: 6'
|
||||
* ```
|
||||
*
|
||||
* Subscribe with functions ({@link deprecations/subscribe-arguments deprecated})
|
||||
*
|
||||
* ```ts
|
||||
* import { of } from 'rxjs'
|
||||
*
|
||||
* let sum = 0;
|
||||
*
|
||||
* of(1, 2, 3).subscribe(
|
||||
* value => {
|
||||
* console.log('Adding: ' + value);
|
||||
* sum = sum + value;
|
||||
* },
|
||||
* undefined,
|
||||
* () => console.log('Sum equals: ' + sum)
|
||||
* );
|
||||
*
|
||||
* // Logs:
|
||||
* // 'Adding: 1'
|
||||
* // 'Adding: 2'
|
||||
* // 'Adding: 3'
|
||||
* // 'Sum equals: 6'
|
||||
* ```
|
||||
*
|
||||
* Cancel a subscription
|
||||
*
|
||||
* ```ts
|
||||
* import { interval } from 'rxjs';
|
||||
*
|
||||
* const subscription = interval(1000).subscribe({
|
||||
* next(num) {
|
||||
* console.log(num)
|
||||
* },
|
||||
* complete() {
|
||||
* // Will not be called, even when cancelling subscription.
|
||||
* console.log('completed!');
|
||||
* }
|
||||
* });
|
||||
*
|
||||
* setTimeout(() => {
|
||||
* subscription.unsubscribe();
|
||||
* console.log('unsubscribed!');
|
||||
* }, 2500);
|
||||
*
|
||||
* // Logs:
|
||||
* // 0 after 1s
|
||||
* // 1 after 2s
|
||||
* // 'unsubscribed!' after 2.5s
|
||||
* ```
|
||||
*
|
||||
* @param {Observer|Function} observerOrNext (optional) Either an observer with methods to be called,
|
||||
* or the first of three possible handlers, which is the handler for each value emitted from the subscribed
|
||||
* Observable.
|
||||
* @param {Function} error (optional) A handler for a terminal event resulting from an error. If no error handler is provided,
|
||||
* the error will be thrown asynchronously as unhandled.
|
||||
* @param {Function} complete (optional) A handler for a terminal event resulting from successful completion.
|
||||
* @return {Subscription} a subscription reference to the registered handlers
|
||||
* @method subscribe
|
||||
*/
|
||||
subscribe(
|
||||
observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null,
|
||||
error?: ((error: any) => void) | null,
|
||||
complete?: (() => void) | null
|
||||
): Subscription {
|
||||
const subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
||||
|
||||
errorContext(() => {
|
||||
const { operator, source } = this;
|
||||
subscriber.add(
|
||||
operator
|
||||
? // We're dealing with a subscription in the
|
||||
// operator chain to one of our lifted operators.
|
||||
operator.call(subscriber, source)
|
||||
: source
|
||||
? // If `source` has a value, but `operator` does not, something that
|
||||
// had intimate knowledge of our API, like our `Subject`, must have
|
||||
// set it. We're going to just call `_subscribe` directly.
|
||||
this._subscribe(subscriber)
|
||||
: // In all other cases, we're likely wrapping a user-provided initializer
|
||||
// function, so we need to catch errors and handle them appropriately.
|
||||
this._trySubscribe(subscriber)
|
||||
);
|
||||
});
|
||||
|
||||
return subscriber;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
protected _trySubscribe(sink: Subscriber<T>): TeardownLogic {
|
||||
try {
|
||||
return this._subscribe(sink);
|
||||
} catch (err) {
|
||||
// We don't need to return anything in this case,
|
||||
// because it's just going to try to `add()` to a subscription
|
||||
// above.
|
||||
sink.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used as a NON-CANCELLABLE means of subscribing to an observable, for use with
|
||||
* APIs that expect promises, like `async/await`. You cannot unsubscribe from this.
|
||||
*
|
||||
* **WARNING**: Only use this with observables you *know* will complete. If the source
|
||||
* observable does not complete, you will end up with a promise that is hung up, and
|
||||
* potentially all of the state of an async function hanging out in memory. To avoid
|
||||
* this situation, look into adding something like {@link timeout}, {@link take},
|
||||
* {@link takeWhile}, or {@link takeUntil} amongst others.
|
||||
*
|
||||
* #### Example
|
||||
*
|
||||
* ```ts
|
||||
* import { interval, take } from 'rxjs';
|
||||
*
|
||||
* const source$ = interval(1000).pipe(take(4));
|
||||
*
|
||||
* async function getTotal() {
|
||||
* let total = 0;
|
||||
*
|
||||
* await source$.forEach(value => {
|
||||
* total += value;
|
||||
* console.log('observable -> ' + value);
|
||||
* });
|
||||
*
|
||||
* return total;
|
||||
* }
|
||||
*
|
||||
* getTotal().then(
|
||||
* total => console.log('Total: ' + total)
|
||||
* );
|
||||
*
|
||||
* // Expected:
|
||||
* // 'observable -> 0'
|
||||
* // 'observable -> 1'
|
||||
* // 'observable -> 2'
|
||||
* // 'observable -> 3'
|
||||
* // 'Total: 6'
|
||||
* ```
|
||||
*
|
||||
* @param next a handler for each value emitted by the observable
|
||||
* @return a promise that either resolves on observable completion or
|
||||
* rejects with the handled error
|
||||
*/
|
||||
forEach(next: (value: T) => void): Promise<void>;
|
||||
|
||||
/**
|
||||
* @param next a handler for each value emitted by the observable
|
||||
* @param promiseCtor a constructor function used to instantiate the Promise
|
||||
* @return a promise that either resolves on observable completion or
|
||||
* rejects with the handled error
|
||||
* @deprecated Passing a Promise constructor will no longer be available
|
||||
* in upcoming versions of RxJS. This is because it adds weight to the library, for very
|
||||
* little benefit. If you need this functionality, it is recommended that you either
|
||||
* polyfill Promise, or you create an adapter to convert the returned native promise
|
||||
* to whatever promise implementation you wanted. Will be removed in v8.
|
||||
*/
|
||||
forEach(next: (value: T) => void, promiseCtor: PromiseConstructorLike): Promise<void>;
|
||||
|
||||
forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise<void> {
|
||||
promiseCtor = getPromiseCtor(promiseCtor);
|
||||
|
||||
return new promiseCtor<void>((resolve, reject) => {
|
||||
const subscriber = new SafeSubscriber<T>({
|
||||
next: (value) => {
|
||||
try {
|
||||
next(value);
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
subscriber.unsubscribe();
|
||||
}
|
||||
},
|
||||
error: reject,
|
||||
complete: resolve,
|
||||
});
|
||||
this.subscribe(subscriber);
|
||||
}) as Promise<void>;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
protected _subscribe(subscriber: Subscriber<any>): TeardownLogic {
|
||||
return this.source?.subscribe(subscriber);
|
||||
}
|
||||
|
||||
/**
|
||||
* An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
|
||||
* @method Symbol.observable
|
||||
* @return {Observable} this instance of the observable
|
||||
*/
|
||||
[Symbol_observable]() {
|
||||
return this;
|
||||
}
|
||||
|
||||
/* tslint:disable:max-line-length */
|
||||
pipe(): Observable<T>;
|
||||
pipe<A>(op1: OperatorFunction<T, A>): Observable<A>;
|
||||
pipe<A, B>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>): Observable<B>;
|
||||
pipe<A, B, C>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>): Observable<C>;
|
||||
pipe<A, B, C, D>(
|
||||
op1: OperatorFunction<T, A>,
|
||||
op2: OperatorFunction<A, B>,
|
||||
op3: OperatorFunction<B, C>,
|
||||
op4: OperatorFunction<C, D>
|
||||
): Observable<D>;
|
||||
pipe<A, B, C, D, E>(
|
||||
op1: OperatorFunction<T, A>,
|
||||
op2: OperatorFunction<A, B>,
|
||||
op3: OperatorFunction<B, C>,
|
||||
op4: OperatorFunction<C, D>,
|
||||
op5: OperatorFunction<D, E>
|
||||
): Observable<E>;
|
||||
pipe<A, B, C, D, E, F>(
|
||||
op1: OperatorFunction<T, A>,
|
||||
op2: OperatorFunction<A, B>,
|
||||
op3: OperatorFunction<B, C>,
|
||||
op4: OperatorFunction<C, D>,
|
||||
op5: OperatorFunction<D, E>,
|
||||
op6: OperatorFunction<E, F>
|
||||
): Observable<F>;
|
||||
pipe<A, B, C, D, E, F, G>(
|
||||
op1: OperatorFunction<T, A>,
|
||||
op2: OperatorFunction<A, B>,
|
||||
op3: OperatorFunction<B, C>,
|
||||
op4: OperatorFunction<C, D>,
|
||||
op5: OperatorFunction<D, E>,
|
||||
op6: OperatorFunction<E, F>,
|
||||
op7: OperatorFunction<F, G>
|
||||
): Observable<G>;
|
||||
pipe<A, B, C, D, E, F, G, H>(
|
||||
op1: OperatorFunction<T, A>,
|
||||
op2: OperatorFunction<A, B>,
|
||||
op3: OperatorFunction<B, C>,
|
||||
op4: OperatorFunction<C, D>,
|
||||
op5: OperatorFunction<D, E>,
|
||||
op6: OperatorFunction<E, F>,
|
||||
op7: OperatorFunction<F, G>,
|
||||
op8: OperatorFunction<G, H>
|
||||
): Observable<H>;
|
||||
pipe<A, B, C, D, E, F, G, H, I>(
|
||||
op1: OperatorFunction<T, A>,
|
||||
op2: OperatorFunction<A, B>,
|
||||
op3: OperatorFunction<B, C>,
|
||||
op4: OperatorFunction<C, D>,
|
||||
op5: OperatorFunction<D, E>,
|
||||
op6: OperatorFunction<E, F>,
|
||||
op7: OperatorFunction<F, G>,
|
||||
op8: OperatorFunction<G, H>,
|
||||
op9: OperatorFunction<H, I>
|
||||
): Observable<I>;
|
||||
pipe<A, B, C, D, E, F, G, H, I>(
|
||||
op1: OperatorFunction<T, A>,
|
||||
op2: OperatorFunction<A, B>,
|
||||
op3: OperatorFunction<B, C>,
|
||||
op4: OperatorFunction<C, D>,
|
||||
op5: OperatorFunction<D, E>,
|
||||
op6: OperatorFunction<E, F>,
|
||||
op7: OperatorFunction<F, G>,
|
||||
op8: OperatorFunction<G, H>,
|
||||
op9: OperatorFunction<H, I>,
|
||||
...operations: OperatorFunction<any, any>[]
|
||||
): Observable<unknown>;
|
||||
/* tslint:enable:max-line-length */
|
||||
|
||||
/**
|
||||
* Used to stitch together functional operators into a chain.
|
||||
* @method pipe
|
||||
* @return {Observable} the Observable result of all of the operators having
|
||||
* been called in the order they were passed in.
|
||||
*
|
||||
* ## Example
|
||||
*
|
||||
* ```ts
|
||||
* import { interval, filter, map, scan } from 'rxjs';
|
||||
*
|
||||
* interval(1000)
|
||||
* .pipe(
|
||||
* filter(x => x % 2 === 0),
|
||||
* map(x => x + x),
|
||||
* scan((acc, x) => acc + x)
|
||||
* )
|
||||
* .subscribe(x => console.log(x));
|
||||
* ```
|
||||
*/
|
||||
pipe(...operations: OperatorFunction<any, any>[]): Observable<any> {
|
||||
return pipeFromArray(operations)(this);
|
||||
}
|
||||
|
||||
/* tslint:disable:max-line-length */
|
||||
/** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */
|
||||
toPromise(): Promise<T | undefined>;
|
||||
/** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */
|
||||
toPromise(PromiseCtor: typeof Promise): Promise<T | undefined>;
|
||||
/** @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise */
|
||||
toPromise(PromiseCtor: PromiseConstructorLike): Promise<T | undefined>;
|
||||
/* tslint:enable:max-line-length */
|
||||
|
||||
/**
|
||||
* Subscribe to this Observable and get a Promise resolving on
|
||||
* `complete` with the last emission (if any).
|
||||
*
|
||||
* **WARNING**: Only use this with observables you *know* will complete. If the source
|
||||
* observable does not complete, you will end up with a promise that is hung up, and
|
||||
* potentially all of the state of an async function hanging out in memory. To avoid
|
||||
* this situation, look into adding something like {@link timeout}, {@link take},
|
||||
* {@link takeWhile}, or {@link takeUntil} amongst others.
|
||||
*
|
||||
* @method toPromise
|
||||
* @param [promiseCtor] a constructor function used to instantiate
|
||||
* the Promise
|
||||
* @return A Promise that resolves with the last value emit, or
|
||||
* rejects on an error. If there were no emissions, Promise
|
||||
* resolves with undefined.
|
||||
* @deprecated Replaced with {@link firstValueFrom} and {@link lastValueFrom}. Will be removed in v8. Details: https://rxjs.dev/deprecations/to-promise
|
||||
*/
|
||||
toPromise(promiseCtor?: PromiseConstructorLike): Promise<T | undefined> {
|
||||
promiseCtor = getPromiseCtor(promiseCtor);
|
||||
|
||||
return new promiseCtor((resolve, reject) => {
|
||||
let value: T | undefined;
|
||||
this.subscribe(
|
||||
(x: T) => (value = x),
|
||||
(err: any) => reject(err),
|
||||
() => resolve(value)
|
||||
);
|
||||
}) as Promise<T | undefined>;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decides between a passed promise constructor from consuming code,
|
||||
* A default configured promise constructor, and the native promise
|
||||
* constructor and returns it. If nothing can be found, it will throw
|
||||
* an error.
|
||||
* @param promiseCtor The optional promise constructor to passed by consuming code
|
||||
*/
|
||||
function getPromiseCtor(promiseCtor: PromiseConstructorLike | undefined) {
|
||||
return promiseCtor ?? config.Promise ?? Promise;
|
||||
}
|
||||
|
||||
function isObserver<T>(value: any): value is Observer<T> {
|
||||
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
|
||||
}
|
||||
|
||||
function isSubscriber<T>(value: any): value is Subscriber<T> {
|
||||
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').retry;
|
||||
@@ -0,0 +1,11 @@
|
||||
function removeUnused(properties) {
|
||||
for (var i = properties.length - 1; i >= 0; i--) {
|
||||
var property = properties[i];
|
||||
|
||||
if (property.unused) {
|
||||
property.all.splice(property.position, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = removeUnused;
|
||||
@@ -0,0 +1,4 @@
|
||||
export function not(pred, thisArg) {
|
||||
return (value, index) => !pred.call(thisArg, value, index);
|
||||
}
|
||||
//# sourceMappingURL=not.js.map
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"B","2":"J D E F A CC"},B:{"1":"C K L G M N O","2":"P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"2":"0 1 2 3 4 5 6 7 8 9 DC tB I v J D E F A B C K L G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB EC FC"},D:{"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 P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC"},E:{"2":"I v J D E F A B C K L G HC zB IC JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC"},F:{"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 h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e PC QC RC SC qB AC TC rB"},G:{"2":"E zB UC BC VC WC XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B"},H:{"2":"oC"},I:{"2":"tB I f pC qC rC sC BC tC uC"},J:{"2":"D A"},K:{"2":"A B C h qB AC rB"},L:{"2":"H"},M:{"2":"H"},N:{"1":"B","2":"A"},O:{"2":"vC"},P:{"2":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"2":"1B"},R:{"2":"9C"},S:{"2":"AD BD"}},B:7,C:"Resource Hints: Lazyload"};
|
||||
@@ -0,0 +1,47 @@
|
||||
var baseToString = require('./_baseToString'),
|
||||
baseTrim = require('./_baseTrim'),
|
||||
castSlice = require('./_castSlice'),
|
||||
charsEndIndex = require('./_charsEndIndex'),
|
||||
charsStartIndex = require('./_charsStartIndex'),
|
||||
stringToArray = require('./_stringToArray'),
|
||||
toString = require('./toString');
|
||||
|
||||
/**
|
||||
* Removes leading and trailing whitespace or specified characters from `string`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @since 3.0.0
|
||||
* @category String
|
||||
* @param {string} [string=''] The string to trim.
|
||||
* @param {string} [chars=whitespace] The characters to trim.
|
||||
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
||||
* @returns {string} Returns the trimmed string.
|
||||
* @example
|
||||
*
|
||||
* _.trim(' abc ');
|
||||
* // => 'abc'
|
||||
*
|
||||
* _.trim('-_-abc-_-', '_-');
|
||||
* // => 'abc'
|
||||
*
|
||||
* _.map([' foo ', ' bar '], _.trim);
|
||||
* // => ['foo', 'bar']
|
||||
*/
|
||||
function trim(string, chars, guard) {
|
||||
string = toString(string);
|
||||
if (string && (guard || chars === undefined)) {
|
||||
return baseTrim(string);
|
||||
}
|
||||
if (!string || !(chars = baseToString(chars))) {
|
||||
return string;
|
||||
}
|
||||
var strSymbols = stringToArray(string),
|
||||
chrSymbols = stringToArray(chars),
|
||||
start = charsStartIndex(strSymbols, chrSymbols),
|
||||
end = charsEndIndex(strSymbols, chrSymbols) + 1;
|
||||
|
||||
return castSlice(strSymbols, start, end).join('');
|
||||
}
|
||||
|
||||
module.exports = trim;
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"mimic-fn","version":"4.0.0","files":{"license":{"checkedAt":1678883669302,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1678883670751,"integrity":"sha512-lrVnWTcqDND/nNIG5zKpXfgy/KViXSq3YfPRw71kMieo/QxrOxiepNIxJAQJZ8xHADFyDgl/f9gMto1q6Vf0iA==","mode":420,"size":2903},"package.json":{"checkedAt":1678883670751,"integrity":"sha512-EmLDkqQnLbVB0cktTe/LuMUKQMD2fpskc+n9zotvBN49D2lBLx9dJcQMkObjqR3XxUtrJc6so/IxcV2JXYmBlw==","mode":420,"size":753},"readme.md":{"checkedAt":1678883670751,"integrity":"sha512-hfnjUCjeb1CZf9E3ya+JrZxQjemBbYky7x0TvFpAIS2VreEB97dJMFvN2CGVoaqAIFB8l1xX+uWBQMiYVXqkxg==","mode":420,"size":2085},"index.d.ts":{"checkedAt":1678883670751,"integrity":"sha512-MlKOg6ZAmovQR0jXOVYF1TpPt4aZGZ/495JkLrY1F/Xjo3WEdHXPjkHT7kLpppMPSLYP79LOUHcIVlh13z4VOw==","mode":420,"size":1321}}}
|
||||
@@ -0,0 +1 @@
|
||||
module.exports={A:{A:{"1":"A B","2":"J D E F CC"},B:{"1":"C K L G M N O P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB","2":"DC tB EC","33":"I v J D E F A B C K L G FC"},D:{"1":"2 3 4 5 6 7 8 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB uB ZB vB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R S T U V W X Y Z a b c d e i j k l m n o p q r s t u f H xB yB GC","2":"I v J D E F","33":"0 1 A B C K L G M N O w g x y z"},E:{"1":"D E F A B C K L G JC KC LC 0B qB rB 1B MC NC 2B 3B 4B 5B sB 6B 7B 8B 9B OC","2":"I v HC zB","33":"J IC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G M N O w g x y z AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB h lB mB nB oB pB P Q R wB S T U V W X Y Z a b c d e rB","2":"F B PC QC RC SC","33":"C TC","36":"qB AC"},G:{"1":"E XC YC ZC aC bC cC dC eC fC gC hC iC jC kC lC mC nC 2B 3B 4B 5B sB 6B 7B 8B 9B","2":"zB UC BC","33":"VC WC"},H:{"2":"oC"},I:{"1":"f tC uC","2":"tB pC qC rC","33":"I sC BC"},J:{"1":"A","2":"D"},K:{"1":"h rB","2":"A B","33":"C","36":"qB AC"},L:{"1":"H"},M:{"1":"H"},N:{"1":"A B"},O:{"1":"vC"},P:{"1":"I g wC xC yC zC 0C 0B 1C 2C 3C 4C 5C sB 6C 7C 8C"},Q:{"1":"1B"},R:{"1":"9C"},S:{"1":"AD BD"}},B:4,C:"CSS Repeating Gradients"};
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"@nodelib/fs.scandir","version":"2.1.5","files":{"LICENSE":{"checkedAt":1678883670836,"integrity":"sha512-klyzttd362E9inpFU2X0jkZ+kaWZ+PhDEXJfMgfuWDKwC4dCmwlGbdsDCsQjWPUstsuss2EizcqjeZNZs2Qp9A==","mode":436,"size":1079},"out/types/index.js":{"checkedAt":1678883670006,"integrity":"sha512-f2XGQDoj2T+xSOglmwEtZVKrO/8Xj0p9ap2c7A9gQp/BiZ45tLyozAivx12afHv9sT/DcspjyF6yKwNV601gAA==","mode":436,"size":77},"out/providers/async.js":{"checkedAt":1678883670853,"integrity":"sha512-WoXtp+p3ulXXpPUp4ayKdwDajXX2a1CASRlhjBhbLtwbxPDv2Fj2ZmQfk1Nw6JZftZMgos4bc1I8um65JX9KJA==","mode":436,"size":3686},"out/constants.js":{"checkedAt":1678883670853,"integrity":"sha512-hOasK2QIaKbiVffIWbV3725ImW9LofOqyTBqlFoid/HqQ1bsHHLl4T4K0Z6qrk7H7pvG62nGzSYQ6FJRz0o63g==","mode":436,"size":990},"out/providers/common.js":{"checkedAt":1678883670853,"integrity":"sha512-c8f1MPG/Zpy1D02SMSnd6zAZIIbhgRxr5ScHe3s5kpHsiK0wV402i0b9HPz1+44fy6SI7Znq7+nZDvvjcvy+ug==","mode":436,"size":419},"out/adapters/fs.js":{"checkedAt":1678883670853,"integrity":"sha512-J3OVy+G4zkvhVMkZKL7uE7nvKpN70jw+aoKLDUtvhrx3ztZp9qt6fQBKxUYTLkQi/xQmDg6OXlfSl2FLT26Uaw==","mode":436,"size":640},"out/utils/fs.js":{"checkedAt":1678883670853,"integrity":"sha512-3LkfRe5//+zfyugzjeuBoUSscu4sr16O2nmiOH4ohiqxwkljkZniKmAmY4OGwceZD4V6YBrFgIWERcrgSqWidA==","mode":436,"size":756},"out/index.js":{"checkedAt":1678883670853,"integrity":"sha512-JKsfkFHNMvmQXjHGdwAzlRctClFw80DpjPNMxWPQ+9aWBWeGgUAixpRFdOuiQaUKf74D2G6xyNpFzI716DO80g==","mode":436,"size":1009},"out/utils/index.js":{"checkedAt":1678883670853,"integrity":"sha512-t+LUPOCYROQRHNicHMHrfxDo9sN8CFWBKBLPIPKgVO88L31zWa6IVlBBcRQkALtYNNpXMMGS7remr2Gd+GZD7w==","mode":436,"size":143},"out/settings.js":{"checkedAt":1678883670854,"integrity":"sha512-qL9hScbtABPUxoRBjcOMG5oBxTUKMdKAPjSa4vDxhPZSyOTQi8BRzAHZRmQ6iiOmRy2NaHAl7e7PzDnTlV3EBg==","mode":436,"size":1076},"README.md":{"checkedAt":1678883670854,"integrity":"sha512-B4CTgoodxUVqnkm1QOfox0KwSNpdK6yQzbHJ3gPn7YFZfCyTcBcmJRp58yq9IqILQeVW+tToX77C1RWvlJ1D2w==","mode":436,"size":4959},"package.json":{"checkedAt":1678883670854,"integrity":"sha512-9vEv5ALUbpNc/TlA8wsz3I56OZXWd11jVJwpoKOKFLHgQNXqDhdAo/aM8oALESe8kMSpEI+/qPM8CsXImdtsFQ==","mode":436,"size":1163},"out/providers/sync.js":{"checkedAt":1678883670854,"integrity":"sha512-/j3lNK6wREF2QRyrFoFJFwm6ao4PjRzyYpiZXVKBxlnL5gaiQbT91vEy5I4kxGMnV9GPh/Fk9BfI2OEM6vx0Jg==","mode":436,"size":1990},"out/providers/async.d.ts":{"checkedAt":1678883670854,"integrity":"sha512-2QYez1e7s+ilgSeWaDkimRcAZL0oav4bZkW++tbMAZ+D3GzUHRVmupqW9AUIXKZ0Wvv5nTpESptTjxciX1DNkg==","mode":436,"size":524},"out/providers/common.d.ts":{"checkedAt":1678883670854,"integrity":"sha512-e1xA23XUkWGB0bRVMXmZAsiUwE1xi6YHG4M8ihHZqrtYOOWlKFAMtqSZsTIYCww+3uSs9apehXLzZXXlAxeIMg==","mode":436,"size":91},"out/constants.d.ts":{"checkedAt":1678883670854,"integrity":"sha512-6nSr8OZ+BQwYRITkY0+LvqDC64UEeBjg98PgqyUZVT/8aojfOs8l49L857V4qIPLLFN54162cBa1HeYG1GT5Eg==","mode":436,"size":118},"out/adapters/fs.d.ts":{"checkedAt":1678883670858,"integrity":"sha512-5dhxcHwYuqsqXlzJ5GeVtrmCaAidi8o7Wr4qcZRSl9ZZJlB32A/ZNEi4bcnym97IGlM/pPfIVDmqwgLFUSyeSg==","mode":436,"size":878},"out/utils/fs.d.ts":{"checkedAt":1678883670858,"integrity":"sha512-RPK/1QV2BVgaBPDDvus1vL1j6m9GBdznugtyFJ6EGkah5a6X+WQ2HNSJAPzsldRX44rR37qJk4gZQlPlXB7oMg==","mode":436,"size":130},"out/index.d.ts":{"checkedAt":1678883670858,"integrity":"sha512-80usDP6yeHPYtvbS7oeptypqMG1TT/M2cbNHRvNkVsJ7do3R8gMcZP0s1zNFv42kst/i04WuubgyPOAnbCxtlQ==","mode":436,"size":855},"out/types/index.d.ts":{"checkedAt":1678883670858,"integrity":"sha512-T2eiVwYcoNhNh2m1wzm+CfljO8cTzQZjBK0xRRCzyJ9tecGyR4e5lhbky5DlUD/fMyhKW3oheTx+d/+tAOPc8A==","mode":436,"size":530},"out/utils/index.d.ts":{"checkedAt":1678883670858,"integrity":"sha512-EmwWEbPFZ0r0VYLkjD2NcHO28/5ZtGXtosQlWEmFl4qytY0bqZQP3dfV6uHe0ZuVvtlS5Gn6+kZSG/CEJUMOvg==","mode":436,"size":43},"out/settings.d.ts":{"checkedAt":1678883670858,"integrity":"sha512-Hb5diIC1qtKxHqhSzcW0/bUN2yG0VJm8YVivdYlh6LII83v5Ds00mVA4aLsPTPrmFkDxm+8GCnkL2YfNHVcuFg==","mode":436,"size":666},"out/providers/sync.d.ts":{"checkedAt":1678883670858,"integrity":"sha512-DHSzT+TkHBHFg/3srj1f4BX/N/LmA6ii+thXWPJG7ipn/TLe58NYCQTanTz5lqyEEjCbRJC+jPrHzKkcAPriwQ==","mode":436,"size":333}}}
|
||||
@@ -0,0 +1,61 @@
|
||||
import { OperatorFunction } from '../types';
|
||||
import { reduce } from './reduce';
|
||||
|
||||
/**
|
||||
* Counts the number of emissions on the source and emits that number when the
|
||||
* source completes.
|
||||
*
|
||||
* <span class="informal">Tells how many values were emitted, when the source
|
||||
* completes.</span>
|
||||
*
|
||||
* 
|
||||
*
|
||||
* `count` transforms an Observable that emits values into an Observable that
|
||||
* emits a single value that represents the number of values emitted by the
|
||||
* source Observable. If the source Observable terminates with an error, `count`
|
||||
* will pass this error notification along without emitting a value first. If
|
||||
* the source Observable does not terminate at all, `count` will neither emit
|
||||
* a value nor terminate. This operator takes an optional `predicate` function
|
||||
* as argument, in which case the output emission will represent the number of
|
||||
* source values that matched `true` with the `predicate`.
|
||||
*
|
||||
* ## Examples
|
||||
*
|
||||
* Counts how many seconds have passed before the first click happened
|
||||
*
|
||||
* ```ts
|
||||
* import { interval, fromEvent, takeUntil, count } from 'rxjs';
|
||||
*
|
||||
* const seconds = interval(1000);
|
||||
* const clicks = fromEvent(document, 'click');
|
||||
* const secondsBeforeClick = seconds.pipe(takeUntil(clicks));
|
||||
* const result = secondsBeforeClick.pipe(count());
|
||||
* result.subscribe(x => console.log(x));
|
||||
* ```
|
||||
*
|
||||
* Counts how many odd numbers are there between 1 and 7
|
||||
*
|
||||
* ```ts
|
||||
* import { range, count } from 'rxjs';
|
||||
*
|
||||
* const numbers = range(1, 7);
|
||||
* const result = numbers.pipe(count(i => i % 2 === 1));
|
||||
* result.subscribe(x => console.log(x));
|
||||
* // Results in:
|
||||
* // 4
|
||||
* ```
|
||||
*
|
||||
* @see {@link max}
|
||||
* @see {@link min}
|
||||
* @see {@link reduce}
|
||||
*
|
||||
* @param predicate A function that is used to analyze the value and the index and
|
||||
* determine whether or not to increment the count. Return `true` to increment the count,
|
||||
* and return `false` to keep the count the same.
|
||||
* If the predicate is not provided, every value will be counted.
|
||||
* @return A function that returns an Observable that emits one number that
|
||||
* represents the count of emissions.
|
||||
*/
|
||||
export function count<T>(predicate?: (value: T, index: number) => boolean): OperatorFunction<T, number> {
|
||||
return reduce((total, value, i) => (!predicate || predicate(value, i) ? total + 1 : total), 0);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { getRandomBytesAsync } from 'expo-random'
|
||||
import { urlAlphabet } from '../url-alphabet/index.js'
|
||||
let random = getRandomBytesAsync
|
||||
let customAlphabet = (alphabet, defaultSize = 21) => {
|
||||
let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
|
||||
let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
|
||||
let tick = (id, size = defaultSize) =>
|
||||
random(step).then(bytes => {
|
||||
let i = step
|
||||
while (i--) {
|
||||
id += alphabet[bytes[i] & mask] || ''
|
||||
if (id.length === size) return id
|
||||
}
|
||||
return tick(id, size)
|
||||
})
|
||||
return size => tick('', size)
|
||||
}
|
||||
let nanoid = (size = 21) =>
|
||||
random(size).then(bytes => {
|
||||
let id = ''
|
||||
while (size--) {
|
||||
id += urlAlphabet[bytes[size] & 63]
|
||||
}
|
||||
return id
|
||||
})
|
||||
export { nanoid, customAlphabet, random }
|
||||
@@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.envReplace = void 0;
|
||||
var env_replace_1 = require("./env-replace");
|
||||
Object.defineProperty(exports, "envReplace", { enumerable: true, get: function () { return env_replace_1.envReplace; } });
|
||||
//# sourceMappingURL=index.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/main/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,370 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v1.12.3](https://github.com/inspect-js/object-inspect/compare/v1.12.2...v1.12.3) - 2023-01-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] in eg FF 24, collections lack forEach [`75fc226`](https://github.com/inspect-js/object-inspect/commit/75fc22673c82d45f28322b1946bb0eb41b672b7f)
|
||||
- [actions] update rebase action to use reusable workflow [`250a277`](https://github.com/inspect-js/object-inspect/commit/250a277a095e9dacc029ab8454dcfc15de549dcd)
|
||||
- [Dev Deps] update `aud`, `es-value-fixtures`, `tape` [`66a19b3`](https://github.com/inspect-js/object-inspect/commit/66a19b3209ccc3c5ef4b34c3cb0160e65d1ce9d5)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `error-cause` [`c43d332`](https://github.com/inspect-js/object-inspect/commit/c43d3324b48384a16fd3dc444e5fc589d785bef3)
|
||||
- [Tests] add `@pkgjs/support` to `postlint` [`e2618d2`](https://github.com/inspect-js/object-inspect/commit/e2618d22a7a3fa361b6629b53c1752fddc9c4d80)
|
||||
|
||||
## [v1.12.2](https://github.com/inspect-js/object-inspect/compare/v1.12.1...v1.12.2) - 2022-05-26
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] use `util.inspect` for a custom inspection symbol method [`e243bf2`](https://github.com/inspect-js/object-inspect/commit/e243bf2eda6c4403ac6f1146fddb14d12e9646c1)
|
||||
- [meta] add support info [`ca20ba3`](https://github.com/inspect-js/object-inspect/commit/ca20ba35713c17068ca912a86c542f5e8acb656c)
|
||||
- [Fix] ignore `cause` in node v16.9 and v16.10 where it has a bug [`86aa553`](https://github.com/inspect-js/object-inspect/commit/86aa553a4a455562c2c56f1540f0bf857b9d314b)
|
||||
|
||||
## [v1.12.1](https://github.com/inspect-js/object-inspect/compare/v1.12.0...v1.12.1) - 2022-05-21
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] use `mock-property` [`4ec8893`](https://github.com/inspect-js/object-inspect/commit/4ec8893ea9bfd28065ca3638cf6762424bf44352)
|
||||
- [meta] use `npmignore` to autogenerate an npmignore file [`07f868c`](https://github.com/inspect-js/object-inspect/commit/07f868c10bd25a9d18686528339bb749c211fc9a)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b05244b`](https://github.com/inspect-js/object-inspect/commit/b05244b4f331e00c43b3151bc498041be77ccc91)
|
||||
- [Dev Deps] update `@ljharb/eslint-config`, `error-cause`, `es-value-fixtures`, `functions-have-names`, `tape` [`d037398`](https://github.com/inspect-js/object-inspect/commit/d037398dcc5d531532e4c19c4a711ed677f579c1)
|
||||
- [Fix] properly handle callable regexes in older engines [`848fe48`](https://github.com/inspect-js/object-inspect/commit/848fe48bd6dd0064ba781ee6f3c5e54a94144c37)
|
||||
|
||||
## [v1.12.0](https://github.com/inspect-js/object-inspect/compare/v1.11.1...v1.12.0) - 2021-12-18
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `numericSeparator` boolean option [`2d2d537`](https://github.com/inspect-js/object-inspect/commit/2d2d537f5359a4300ce1c10241369f8024f89e11)
|
||||
- [Robustness] cache more prototype methods [`191533d`](https://github.com/inspect-js/object-inspect/commit/191533da8aec98a05eadd73a5a6e979c9c8653e8)
|
||||
- [New] ensure an Error’s `cause` is displayed [`53bc2ce`](https://github.com/inspect-js/object-inspect/commit/53bc2cee4e5a9cc4986f3cafa22c0685f340715e)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`bc164b6`](https://github.com/inspect-js/object-inspect/commit/bc164b6e2e7d36b263970f16f54de63048b84a36)
|
||||
- [Robustness] cache `RegExp.prototype.test` [`a314ab8`](https://github.com/inspect-js/object-inspect/commit/a314ab8271b905cbabc594c82914d2485a8daf12)
|
||||
- [meta] fix auto-changelog settings [`5ed0983`](https://github.com/inspect-js/object-inspect/commit/5ed0983be72f73e32e2559997517a95525c7e20d)
|
||||
|
||||
## [v1.11.1](https://github.com/inspect-js/object-inspect/compare/v1.11.0...v1.11.1) - 2021-12-05
|
||||
|
||||
### Commits
|
||||
|
||||
- [meta] add `auto-changelog` [`7dbdd22`](https://github.com/inspect-js/object-inspect/commit/7dbdd228401d6025d8b7391476d88aee9ea9bbdf)
|
||||
- [actions] reuse common workflows [`c8823bc`](https://github.com/inspect-js/object-inspect/commit/c8823bc0a8790729680709d45fb6e652432e91aa)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`7532b12`](https://github.com/inspect-js/object-inspect/commit/7532b120598307497b712890f75af8056f6d37a6)
|
||||
- [Refactor] use `has-tostringtag` to behave correctly in the presence of symbol shams [`94abb5d`](https://github.com/inspect-js/object-inspect/commit/94abb5d4e745bf33253942dea86b3e538d2ff6c6)
|
||||
- [actions] update codecov uploader [`5ed5102`](https://github.com/inspect-js/object-inspect/commit/5ed51025267a00e53b1341357315490ac4eb0874)
|
||||
- [Dev Deps] update `eslint`, `tape` [`37b2ad2`](https://github.com/inspect-js/object-inspect/commit/37b2ad26c08d94bfd01d5d07069a0b28ef4e2ad7)
|
||||
- [meta] add `sideEffects` flag [`d341f90`](https://github.com/inspect-js/object-inspect/commit/d341f905ef8bffa6a694cda6ddc5ba343532cd4f)
|
||||
|
||||
## [v1.11.0](https://github.com/inspect-js/object-inspect/compare/v1.10.3...v1.11.0) - 2021-07-12
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] `customInspect`: add `symbol` option, to mimic modern util.inspect behavior [`e973a6e`](https://github.com/inspect-js/object-inspect/commit/e973a6e21f8140c5837cf25e9d89bdde88dc3120)
|
||||
- [Dev Deps] update `eslint` [`05f1cb3`](https://github.com/inspect-js/object-inspect/commit/05f1cb3cbcfe1f238e8b51cf9bc294305b7ed793)
|
||||
|
||||
## [v1.10.3](https://github.com/inspect-js/object-inspect/compare/v1.10.2...v1.10.3) - 2021-05-07
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] handle core-js Symbol shams [`4acfc2c`](https://github.com/inspect-js/object-inspect/commit/4acfc2c4b503498759120eb517abad6d51c9c5d6)
|
||||
- [readme] update badges [`95c323a`](https://github.com/inspect-js/object-inspect/commit/95c323ad909d6cbabb95dd6015c190ba6db9c1f2)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud` [`cb38f48`](https://github.com/inspect-js/object-inspect/commit/cb38f485de6ec7a95109b5a9bbd0a1deba2f6611)
|
||||
|
||||
## [v1.10.2](https://github.com/inspect-js/object-inspect/compare/v1.10.1...v1.10.2) - 2021-04-17
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] use a robust check for a boxed Symbol [`87f12d6`](https://github.com/inspect-js/object-inspect/commit/87f12d6e69ce530be04659c81a4cd502943acac5)
|
||||
|
||||
## [v1.10.1](https://github.com/inspect-js/object-inspect/compare/v1.10.0...v1.10.1) - 2021-04-17
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] use a robust check for a boxed bigint [`d5ca829`](https://github.com/inspect-js/object-inspect/commit/d5ca8298b6d2e5c7b9334a5b21b96ed95d225c91)
|
||||
|
||||
## [v1.10.0](https://github.com/inspect-js/object-inspect/compare/v1.9.0...v1.10.0) - 2021-04-17
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] increase coverage [`d8abb8a`](https://github.com/inspect-js/object-inspect/commit/d8abb8a62c2f084919df994a433b346e0d87a227)
|
||||
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`4bfec2e`](https://github.com/inspect-js/object-inspect/commit/4bfec2e30aaef6ddef6cbb1448306f9f8b9520b7)
|
||||
- [New] respect `Symbol.toStringTag` on objects [`799b58f`](https://github.com/inspect-js/object-inspect/commit/799b58f536a45e4484633a8e9daeb0330835f175)
|
||||
- [Fix] do not allow Symbol.toStringTag to masquerade as builtins [`d6c5b37`](https://github.com/inspect-js/object-inspect/commit/d6c5b37d7e94427796b82432fb0c8964f033a6ab)
|
||||
- [New] add `WeakRef` support [`b6d898e`](https://github.com/inspect-js/object-inspect/commit/b6d898ee21868c780a7ee66b28532b5b34ed7f09)
|
||||
- [meta] do not publish github action workflow files [`918cdfc`](https://github.com/inspect-js/object-inspect/commit/918cdfc4b6fe83f559ff6ef04fe66201e3ff5cbd)
|
||||
- [meta] create `FUNDING.yml` [`0bb5fc5`](https://github.com/inspect-js/object-inspect/commit/0bb5fc516dbcd2cd728bd89cee0b580acc5ce301)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`22c8dc0`](https://github.com/inspect-js/object-inspect/commit/22c8dc0cac113d70f4781e49a950070923a671be)
|
||||
- [meta] use `prepublishOnly` script for npm 7+ [`e52ee09`](https://github.com/inspect-js/object-inspect/commit/e52ee09e8050b8dbac94ef57f786675567728223)
|
||||
- [Dev Deps] update `eslint` [`7c4e6fd`](https://github.com/inspect-js/object-inspect/commit/7c4e6fdedcd27cc980e13c9ad834d05a96f3d40c)
|
||||
|
||||
## [v1.9.0](https://github.com/inspect-js/object-inspect/compare/v1.8.0...v1.9.0) - 2020-11-30
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] migrate tests to Github Actions [`d262251`](https://github.com/inspect-js/object-inspect/commit/d262251e13e16d3490b5473672f6b6d6ff86675d)
|
||||
- [New] add enumerable own Symbols to plain object output [`ee60c03`](https://github.com/inspect-js/object-inspect/commit/ee60c033088cff9d33baa71e59a362a541b48284)
|
||||
- [Tests] add passing tests [`01ac3e4`](https://github.com/inspect-js/object-inspect/commit/01ac3e4b5a30f97875a63dc9b1416b3bd626afc9)
|
||||
- [actions] add "Require Allow Edits" action [`c2d7746`](https://github.com/inspect-js/object-inspect/commit/c2d774680cde4ca4af332d84d4121b26f798ba9e)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `core-js` [`70058de`](https://github.com/inspect-js/object-inspect/commit/70058de1579fc54d1d15ed6c2dbe246637ce70ff)
|
||||
- [Fix] hex characters in strings should be uppercased, to match node `assert` [`6ab8faa`](https://github.com/inspect-js/object-inspect/commit/6ab8faaa0abc08fe7a8e2afd8b39c6f1f0e00113)
|
||||
- [Tests] run `nyc` on all tests [`4c47372`](https://github.com/inspect-js/object-inspect/commit/4c473727879ddc8e28b599202551ddaaf07b6210)
|
||||
- [Tests] node 0.8 has an unpredictable property order; fix `groups` test by removing property [`f192069`](https://github.com/inspect-js/object-inspect/commit/f192069a978a3b60e6f0e0d45ac7df260ab9a778)
|
||||
- [New] add enumerable properties to Function inspect result, per node’s `assert` [`fd38e1b`](https://github.com/inspect-js/object-inspect/commit/fd38e1bc3e2a1dc82091ce3e021917462eee64fc)
|
||||
- [Tests] fix tests for node < 10, due to regex match `groups` [`2ac6462`](https://github.com/inspect-js/object-inspect/commit/2ac6462cc4f72eaa0b63a8cfee9aabe3008b2330)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config` [`44b59e2`](https://github.com/inspect-js/object-inspect/commit/44b59e2676a7f825ef530dfd19dafb599e3b9456)
|
||||
- [Robustness] cache `Symbol.prototype.toString` [`f3c2074`](https://github.com/inspect-js/object-inspect/commit/f3c2074d8f32faf8292587c07c9678ea931703dd)
|
||||
- [Dev Deps] update `eslint` [`9411294`](https://github.com/inspect-js/object-inspect/commit/94112944b9245e3302e25453277876402d207e7f)
|
||||
- [meta] `require-allow-edits` no longer requires an explicit github token [`36c0220`](https://github.com/inspect-js/object-inspect/commit/36c02205de3c2b0e84d53777c5c9fd54a36c48ab)
|
||||
- [actions] update rebase checkout action to v2 [`55a39a6`](https://github.com/inspect-js/object-inspect/commit/55a39a64e944f19c6a7d8efddf3df27700f20d14)
|
||||
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f59fd3c`](https://github.com/inspect-js/object-inspect/commit/f59fd3cf406c3a7c7ece140904a80bbc6bacfcca)
|
||||
- [Dev Deps] update `eslint` [`a492bec`](https://github.com/inspect-js/object-inspect/commit/a492becec644b0155c9c4bc1caf6f9fac11fb2c7)
|
||||
|
||||
## [v1.8.0](https://github.com/inspect-js/object-inspect/compare/v1.7.0...v1.8.0) - 2020-06-18
|
||||
|
||||
### Fixed
|
||||
|
||||
- [New] add `indent` option [`#27`](https://github.com/inspect-js/object-inspect/issues/27)
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] add codecov [`4324cbb`](https://github.com/inspect-js/object-inspect/commit/4324cbb1a2bd7710822a4151ff373570db22453e)
|
||||
- [New] add `maxStringLength` option [`b3995cb`](https://github.com/inspect-js/object-inspect/commit/b3995cb71e15b5ee127a3094c43994df9d973502)
|
||||
- [New] add `customInspect` option, to disable custom inspect methods [`28b9179`](https://github.com/inspect-js/object-inspect/commit/28b9179ee802bb3b90810100c11637db90c2fb6d)
|
||||
- [Tests] add Date and RegExp tests [`3b28eca`](https://github.com/inspect-js/object-inspect/commit/3b28eca57b0367aeadffac604ea09e8bdae7d97b)
|
||||
- [actions] add automatic rebasing / merge commit blocking [`0d9c6c0`](https://github.com/inspect-js/object-inspect/commit/0d9c6c044e83475ff0bfffb9d35b149834c83a2e)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape`; add `aud` [`7c204f2`](https://github.com/inspect-js/object-inspect/commit/7c204f22b9e41bc97147f4d32d4cb045b17769a6)
|
||||
- [readme] fix repo URLs, remove testling [`34ca9a0`](https://github.com/inspect-js/object-inspect/commit/34ca9a0dabfe75bd311f806a326fadad029909a3)
|
||||
- [Fix] when truncating a deep array, note it as `[Array]` instead of just `[Object]` [`f74c82d`](https://github.com/inspect-js/object-inspect/commit/f74c82dd0b35386445510deb250f34c41be3ec0e)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`1a8a5ea`](https://github.com/inspect-js/object-inspect/commit/1a8a5ea069ea2bee89d77caedad83ffa23d35711)
|
||||
- [Fix] do not be fooled by a function’s own `toString` method [`7cb5c65`](https://github.com/inspect-js/object-inspect/commit/7cb5c657a976f94715c19c10556a30f15bb7d5d7)
|
||||
- [patch] indicate explicitly that anon functions are anonymous, to match node [`81ebdd4`](https://github.com/inspect-js/object-inspect/commit/81ebdd4215005144074bbdff3f6bafa01407910a)
|
||||
- [Dev Deps] loosen the `core-js` dep [`e7472e8`](https://github.com/inspect-js/object-inspect/commit/e7472e8e242117670560bd995830c2a4d12080f5)
|
||||
- [Dev Deps] update `tape` [`699827e`](https://github.com/inspect-js/object-inspect/commit/699827e6b37258b5203c33c78c009bf4b0e6a66d)
|
||||
- [meta] add `safe-publish-latest` [`c5d2868`](https://github.com/inspect-js/object-inspect/commit/c5d2868d6eb33c472f37a20f89ceef2787046088)
|
||||
- [Dev Deps] update `@ljharb/eslint-config` [`9199501`](https://github.com/inspect-js/object-inspect/commit/919950195d486114ccebacbdf9d74d7f382693b0)
|
||||
|
||||
## [v1.7.0](https://github.com/inspect-js/object-inspect/compare/v1.6.0...v1.7.0) - 2019-11-10
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] use shared travis-ci configs [`19899ed`](https://github.com/inspect-js/object-inspect/commit/19899edbf31f4f8809acf745ce34ad1ce1bfa63b)
|
||||
- [Tests] add linting [`a00f057`](https://github.com/inspect-js/object-inspect/commit/a00f057d917f66ea26dd37769c6b810ec4af97e8)
|
||||
- [Tests] lint last file [`2698047`](https://github.com/inspect-js/object-inspect/commit/2698047b58af1e2e88061598ef37a75f228dddf6)
|
||||
- [Tests] up to `node` `v12.7`, `v11.15`, `v10.16`, `v8.16`, `v6.17` [`589e87a`](https://github.com/inspect-js/object-inspect/commit/589e87a99cadcff4b600e6a303418e9d922836e8)
|
||||
- [New] add support for `WeakMap` and `WeakSet` [`3ddb3e4`](https://github.com/inspect-js/object-inspect/commit/3ddb3e4e0c8287130c61a12e0ed9c104b1549306)
|
||||
- [meta] clean up license so github can detect it properly [`27527bb`](https://github.com/inspect-js/object-inspect/commit/27527bb801520c9610c68cc3b55d6f20a2bee56d)
|
||||
- [Tests] cover `util.inspect.custom` [`36d47b9`](https://github.com/inspect-js/object-inspect/commit/36d47b9c59056a57ef2f1491602c726359561800)
|
||||
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `tape` [`b614eaa`](https://github.com/inspect-js/object-inspect/commit/b614eaac901da0e5c69151f534671f990a94cace)
|
||||
- [Tests] fix coverage thresholds [`7b7b176`](https://github.com/inspect-js/object-inspect/commit/7b7b176e15f8bd6e8b2f261ff5a493c2fe78d9c2)
|
||||
- [Tests] bigint tests now can run on unflagged node [`063af31`](https://github.com/inspect-js/object-inspect/commit/063af31ce9cd13c202e3b67c07ba06dc9b7c0f81)
|
||||
- [Refactor] add early bailout to `isMap` and `isSet` checks [`fc51047`](https://github.com/inspect-js/object-inspect/commit/fc5104714a3671d37e225813db79470d6335683b)
|
||||
- [meta] add `funding` field [`7f9953a`](https://github.com/inspect-js/object-inspect/commit/7f9953a113eec7b064a6393cf9f90ba15f1d131b)
|
||||
- [Tests] Fix invalid strict-mode syntax with hexadecimal [`a8b5425`](https://github.com/inspect-js/object-inspect/commit/a8b542503b4af1599a275209a1a99f5fdedb1ead)
|
||||
- [Dev Deps] update `@ljharb/eslint-config` [`98df157`](https://github.com/inspect-js/object-inspect/commit/98df1577314d9188a3fc3f17fdcf2fba697ae1bd)
|
||||
- add copyright to LICENSE [`bb69fd0`](https://github.com/inspect-js/object-inspect/commit/bb69fd017a062d299e44da1f9b2c7dcd67f621e6)
|
||||
- [Tests] use `npx aud` in `posttest` [`4838353`](https://github.com/inspect-js/object-inspect/commit/4838353593974cf7f905b9ef04c03c094f0cdbe2)
|
||||
- [Tests] move `0.6` to allowed failures, because it won‘t build on travis [`1bff32a`](https://github.com/inspect-js/object-inspect/commit/1bff32aa52e8aea687f0856b28ba754b3e43ebf7)
|
||||
|
||||
## [v1.6.0](https://github.com/inspect-js/object-inspect/compare/v1.5.0...v1.6.0) - 2018-05-02
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add support for boxed BigInt primitives [`356c66a`](https://github.com/inspect-js/object-inspect/commit/356c66a410e7aece7162c8319880a5ef647beaa9)
|
||||
- [Tests] up to `node` `v10.0`, `v9.11`, `v8.11`, `v6.14`, `v4.9` [`c77b65b`](https://github.com/inspect-js/object-inspect/commit/c77b65bba593811b906b9ec57561c5cba92e2db3)
|
||||
- [New] Add support for upcoming `BigInt` [`1ac548e`](https://github.com/inspect-js/object-inspect/commit/1ac548e4b27e26466c28c9a5e63e5d4e0591c31f)
|
||||
- [Tests] run bigint tests in CI with --harmony-bigint flag [`d31b738`](https://github.com/inspect-js/object-inspect/commit/d31b73831880254b5c6cf5691cda9a149fbc5f04)
|
||||
- [Dev Deps] update `core-js`, `tape` [`ff9eff6`](https://github.com/inspect-js/object-inspect/commit/ff9eff67113341ee1aaf80c1c22d683f43bfbccf)
|
||||
- [Docs] fix example to use `safer-buffer` [`48cae12`](https://github.com/inspect-js/object-inspect/commit/48cae12a73ec6cacc955175bc56bbe6aee6a211f)
|
||||
|
||||
## [v1.5.0](https://github.com/inspect-js/object-inspect/compare/v1.4.1...v1.5.0) - 2017-12-25
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add `quoteStyle` option [`f5a72d2`](https://github.com/inspect-js/object-inspect/commit/f5a72d26edb3959b048f74c056ca7100a6b091e4)
|
||||
- [Tests] add more test coverage [`30ebe4e`](https://github.com/inspect-js/object-inspect/commit/30ebe4e1fa943b99ecbb85be7614256d536e2759)
|
||||
- [Tests] require 0.6 to pass [`99a008c`](https://github.com/inspect-js/object-inspect/commit/99a008ccace189a60fd7da18bf00e32c9572b980)
|
||||
|
||||
## [v1.4.1](https://github.com/inspect-js/object-inspect/compare/v1.4.0...v1.4.1) - 2017-12-19
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] up to `node` `v9.3`, `v8.9`, `v6.12` [`6674476`](https://github.com/inspect-js/object-inspect/commit/6674476cc56acaac1bde96c84fed5ef631911906)
|
||||
- [Fix] `inspect(Object(-0))` should be “Object(-0)”, not “Object(0)” [`d0a031f`](https://github.com/inspect-js/object-inspect/commit/d0a031f1cbb3024ee9982bfe364dd18a7e4d1bd3)
|
||||
|
||||
## [v1.4.0](https://github.com/inspect-js/object-inspect/compare/v1.3.0...v1.4.0) - 2017-10-24
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] add `npm run coverage` [`3b48fb2`](https://github.com/inspect-js/object-inspect/commit/3b48fb25db037235eeb808f0b2830aad7aa36f70)
|
||||
- [Tests] remove commented-out osx builds [`71e24db`](https://github.com/inspect-js/object-inspect/commit/71e24db8ad6ee3b9b381c5300b0475f2ba595a73)
|
||||
- [New] add support for `util.inspect.custom`, in node only. [`20cca77`](https://github.com/inspect-js/object-inspect/commit/20cca7762d7e17f15b21a90793dff84acce155df)
|
||||
- [Tests] up to `node` `v8.6`; use `nvm install-latest-npm` to ensure new npm doesn’t break old node [`252952d`](https://github.com/inspect-js/object-inspect/commit/252952d230d8065851dd3d4d5fe8398aae068529)
|
||||
- [Tests] up to `node` `v8.8` [`4aa868d`](https://github.com/inspect-js/object-inspect/commit/4aa868d3a62914091d489dd6ec6eed194ee67cd3)
|
||||
- [Dev Deps] update `core-js`, `tape` [`59483d1`](https://github.com/inspect-js/object-inspect/commit/59483d1df418f852f51fa0db7b24aa6b0209a27a)
|
||||
|
||||
## [v1.3.0](https://github.com/inspect-js/object-inspect/compare/v1.2.2...v1.3.0) - 2017-07-31
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Fix] Map/Set: work around core-js bug < v2.5.0 [`#9`](https://github.com/inspect-js/object-inspect/issues/9)
|
||||
|
||||
### Commits
|
||||
|
||||
- [New] add support for arrays with additional object keys [`0d19937`](https://github.com/inspect-js/object-inspect/commit/0d199374ee37959e51539616666f420ccb29acb9)
|
||||
- [Tests] up to `node` `v8.2`, `v7.10`, `v6.11`; fix new npm breaking on older nodes [`e24784a`](https://github.com/inspect-js/object-inspect/commit/e24784a90c49117787157a12a63897c49cf89bbb)
|
||||
- Only apps should have lockfiles [`c6faebc`](https://github.com/inspect-js/object-inspect/commit/c6faebcb2ee486a889a4a1c4d78c0776c7576185)
|
||||
- [Dev Deps] update `tape` [`7345a0a`](https://github.com/inspect-js/object-inspect/commit/7345a0aeba7e91b888a079c10004d17696a7f586)
|
||||
|
||||
## [v1.2.2](https://github.com/inspect-js/object-inspect/compare/v1.2.1...v1.2.2) - 2017-03-24
|
||||
|
||||
### Commits
|
||||
|
||||
- [Tests] up to `node` `v7.7`, `v6.10`, `v4.8`; improve test matrix [`a2ddc15`](https://github.com/inspect-js/object-inspect/commit/a2ddc15a1f2c65af18076eea1c0eb9cbceb478a0)
|
||||
- [Tests] up to `node` `v7.0`, `v6.9`, `v5.12`, `v4.6`, `io.js` `v3.3`; improve test matrix [`a48949f`](https://github.com/inspect-js/object-inspect/commit/a48949f6b574b2d4d2298109d8e8d0eb3e7a83e7)
|
||||
- [Performance] check for primitive types as early as possible. [`3b8092a`](https://github.com/inspect-js/object-inspect/commit/3b8092a2a4deffd0575f94334f00194e2d48dad3)
|
||||
- [Refactor] remove unneeded `else`s. [`7255034`](https://github.com/inspect-js/object-inspect/commit/725503402e08de4f96f6bf2d8edef44ac36f26b6)
|
||||
- [Refactor] avoid recreating `lowbyte` function every time. [`81edd34`](https://github.com/inspect-js/object-inspect/commit/81edd3475bd15bdd18e84de7472033dcf5004aaa)
|
||||
- [Fix] differentiate -0 from 0 [`521d345`](https://github.com/inspect-js/object-inspect/commit/521d3456b009da7bf1c5785c8a9df5a9f8718264)
|
||||
- [Refactor] move object key gathering into separate function [`aca6265`](https://github.com/inspect-js/object-inspect/commit/aca626536eaeef697196c6e9db3e90e7e0355b6a)
|
||||
- [Refactor] consolidate wrapping logic for boxed primitives into a function. [`4e440cd`](https://github.com/inspect-js/object-inspect/commit/4e440cd9065df04802a2a1dead03f48c353ca301)
|
||||
- [Robustness] use `typeof` instead of comparing to literal `undefined` [`5ca6f60`](https://github.com/inspect-js/object-inspect/commit/5ca6f601937506daff8ed2fcf686363b55807b69)
|
||||
- [Refactor] consolidate Map/Set notations. [`4e576e5`](https://github.com/inspect-js/object-inspect/commit/4e576e5d7ed2f9ec3fb7f37a0d16732eb10758a9)
|
||||
- [Tests] ensure that this function remains anonymous, despite ES6 name inference. [`7540ae5`](https://github.com/inspect-js/object-inspect/commit/7540ae591278756db614fa4def55ca413150e1a3)
|
||||
- [Refactor] explicitly coerce Error objects to strings. [`7f4ca84`](https://github.com/inspect-js/object-inspect/commit/7f4ca8424ee8dc2c0ca5a422d94f7fac40327261)
|
||||
- [Refactor] split up `var` declarations for debuggability [`6f2c11e`](https://github.com/inspect-js/object-inspect/commit/6f2c11e6a85418586a00292dcec5e97683f89bc3)
|
||||
- [Robustness] cache `Object.prototype.toString` [`df44a20`](https://github.com/inspect-js/object-inspect/commit/df44a20adfccf31529d60d1df2079bfc3c836e27)
|
||||
- [Dev Deps] update `tape` [`3ec714e`](https://github.com/inspect-js/object-inspect/commit/3ec714eba57bc3f58a6eb4fca1376f49e70d300a)
|
||||
- [Dev Deps] update `tape` [`beb72d9`](https://github.com/inspect-js/object-inspect/commit/beb72d969653747d7cde300393c28755375329b0)
|
||||
|
||||
## [v1.2.1](https://github.com/inspect-js/object-inspect/compare/v1.2.0...v1.2.1) - 2016-04-09
|
||||
|
||||
### Fixed
|
||||
|
||||
- [Fix] fix Boolean `false` object inspection. [`#7`](https://github.com/substack/object-inspect/pull/7)
|
||||
|
||||
## [v1.2.0](https://github.com/inspect-js/object-inspect/compare/v1.1.0...v1.2.0) - 2016-04-09
|
||||
|
||||
### Fixed
|
||||
|
||||
- [New] add support for inspecting String/Number/Boolean objects. [`#6`](https://github.com/inspect-js/object-inspect/issues/6)
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `tape` [`742caa2`](https://github.com/inspect-js/object-inspect/commit/742caa262cf7af4c815d4821c8bd0129c1446432)
|
||||
|
||||
## [v1.1.0](https://github.com/inspect-js/object-inspect/compare/1.0.2...v1.1.0) - 2015-12-14
|
||||
|
||||
### Merged
|
||||
|
||||
- [New] add ES6 Map/Set support. [`#4`](https://github.com/inspect-js/object-inspect/pull/4)
|
||||
|
||||
### Fixed
|
||||
|
||||
- [New] add ES6 Map/Set support. [`#3`](https://github.com/inspect-js/object-inspect/issues/3)
|
||||
|
||||
### Commits
|
||||
|
||||
- Update `travis.yml` to test on bunches of `iojs` and `node` versions. [`4c1fd65`](https://github.com/inspect-js/object-inspect/commit/4c1fd65cc3bd95307e854d114b90478324287fd2)
|
||||
- [Dev Deps] update `tape` [`88a907e`](https://github.com/inspect-js/object-inspect/commit/88a907e33afbe408e4b5d6e4e42a33143f88848c)
|
||||
|
||||
## [1.0.2](https://github.com/inspect-js/object-inspect/compare/1.0.1...1.0.2) - 2015-08-07
|
||||
|
||||
### Commits
|
||||
|
||||
- [Fix] Cache `Object.prototype.hasOwnProperty` in case it's deleted later. [`1d0075d`](https://github.com/inspect-js/object-inspect/commit/1d0075d3091dc82246feeb1f9871cb2b8ed227b3)
|
||||
- [Dev Deps] Update `tape` [`ca8d5d7`](https://github.com/inspect-js/object-inspect/commit/ca8d5d75635ddbf76f944e628267581e04958457)
|
||||
- gitignore node_modules since this is a reusable modules. [`ed41407`](https://github.com/inspect-js/object-inspect/commit/ed41407811743ca530cdeb28f982beb96026af82)
|
||||
|
||||
## [1.0.1](https://github.com/inspect-js/object-inspect/compare/1.0.0...1.0.1) - 2015-07-19
|
||||
|
||||
### Commits
|
||||
|
||||
- Make `inspect` work with symbol primitives and objects, including in node 0.11 and 0.12. [`ddf1b94`](https://github.com/inspect-js/object-inspect/commit/ddf1b94475ab951f1e3bccdc0a48e9073cfbfef4)
|
||||
- bump tape [`103d674`](https://github.com/inspect-js/object-inspect/commit/103d67496b504bdcfdd765d303a773f87ec106e2)
|
||||
- use newer travis config [`d497276`](https://github.com/inspect-js/object-inspect/commit/d497276c1da14234bb5098a59cf20de75fbc316a)
|
||||
|
||||
## [1.0.0](https://github.com/inspect-js/object-inspect/compare/0.4.0...1.0.0) - 2014-08-05
|
||||
|
||||
### Commits
|
||||
|
||||
- error inspect works properly [`260a22d`](https://github.com/inspect-js/object-inspect/commit/260a22d134d3a8a482c67d52091c6040c34f4299)
|
||||
- seen coverage [`57269e8`](https://github.com/inspect-js/object-inspect/commit/57269e8baa992a7439047f47325111fdcbcb8417)
|
||||
- htmlelement instance coverage [`397ffe1`](https://github.com/inspect-js/object-inspect/commit/397ffe10a1980350868043ef9de65686d438979f)
|
||||
- more element coverage [`6905cc2`](https://github.com/inspect-js/object-inspect/commit/6905cc2f7df35600177e613b0642b4df5efd3eca)
|
||||
- failing test for type errors [`385b615`](https://github.com/inspect-js/object-inspect/commit/385b6152e49b51b68449a662f410b084ed7c601a)
|
||||
- fn name coverage [`edc906d`](https://github.com/inspect-js/object-inspect/commit/edc906d40fca6b9194d304062c037ee8e398c4c2)
|
||||
- server-side element test [`362d1d3`](https://github.com/inspect-js/object-inspect/commit/362d1d3e86f187651c29feeb8478110afada385b)
|
||||
- custom inspect fn [`e89b0f6`](https://github.com/inspect-js/object-inspect/commit/e89b0f6fe6d5e03681282af83732a509160435a6)
|
||||
- fixed browser test [`b530882`](https://github.com/inspect-js/object-inspect/commit/b5308824a1c8471c5617e394766a03a6977102a9)
|
||||
- depth test, matches node [`1cfd9e0`](https://github.com/inspect-js/object-inspect/commit/1cfd9e0285a4ae1dff44101ad482915d9bf47e48)
|
||||
- exercise hasOwnProperty path [`8d753fb`](https://github.com/inspect-js/object-inspect/commit/8d753fb362a534fa1106e4d80f2ee9bea06a66d9)
|
||||
- more cases covered for errors [`c5c46a5`](https://github.com/inspect-js/object-inspect/commit/c5c46a569ec4606583497e8550f0d8c7ad39a4a4)
|
||||
- \W obj key test case [`b0eceee`](https://github.com/inspect-js/object-inspect/commit/b0eceeea6e0eb94d686c1046e99b9e25e5005f75)
|
||||
- coverage for explicit depth param [`e12b91c`](https://github.com/inspect-js/object-inspect/commit/e12b91cd59683362f3a0e80f46481a0211e26c15)
|
||||
|
||||
## [0.4.0](https://github.com/inspect-js/object-inspect/compare/0.3.1...0.4.0) - 2014-03-21
|
||||
|
||||
### Commits
|
||||
|
||||
- passing lowbyte interpolation test [`b847511`](https://github.com/inspect-js/object-inspect/commit/b8475114f5def7e7961c5353d48d3d8d9a520985)
|
||||
- lowbyte test [`4a2b0e1`](https://github.com/inspect-js/object-inspect/commit/4a2b0e142667fc933f195472759385ac08f3946c)
|
||||
|
||||
## [0.3.1](https://github.com/inspect-js/object-inspect/compare/0.3.0...0.3.1) - 2014-03-04
|
||||
|
||||
### Commits
|
||||
|
||||
- sort keys [`a07b19c`](https://github.com/inspect-js/object-inspect/commit/a07b19cc3b1521a82d4fafb6368b7a9775428a05)
|
||||
|
||||
## [0.3.0](https://github.com/inspect-js/object-inspect/compare/0.2.0...0.3.0) - 2014-03-04
|
||||
|
||||
### Commits
|
||||
|
||||
- [] and {} instead of [ ] and { } [`654c44b`](https://github.com/inspect-js/object-inspect/commit/654c44b2865811f3519e57bb8526e0821caf5c6b)
|
||||
|
||||
## [0.2.0](https://github.com/inspect-js/object-inspect/compare/0.1.3...0.2.0) - 2014-03-04
|
||||
|
||||
### Commits
|
||||
|
||||
- failing holes test [`99cdfad`](https://github.com/inspect-js/object-inspect/commit/99cdfad03c6474740275a75636fe6ca86c77737a)
|
||||
- regex already work [`e324033`](https://github.com/inspect-js/object-inspect/commit/e324033267025995ec97d32ed0a65737c99477a6)
|
||||
- failing undef/null test [`1f88a00`](https://github.com/inspect-js/object-inspect/commit/1f88a00265d3209719dda8117b7e6360b4c20943)
|
||||
- holes in the all example [`7d345f3`](https://github.com/inspect-js/object-inspect/commit/7d345f3676dcbe980cff89a4f6c243269ebbb709)
|
||||
- check for .inspect(), fixes Buffer use-case [`c3f7546`](https://github.com/inspect-js/object-inspect/commit/c3f75466dbca125347d49847c05262c292f12b79)
|
||||
- fixes for holes [`ce25f73`](https://github.com/inspect-js/object-inspect/commit/ce25f736683de4b92ff27dc5471218415e2d78d8)
|
||||
- weird null behavior [`405c1ea`](https://github.com/inspect-js/object-inspect/commit/405c1ea72cd5a8cf3b498c3eaa903d01b9fbcab5)
|
||||
- tape is actually a devDependency, upgrade [`703b0ce`](https://github.com/inspect-js/object-inspect/commit/703b0ce6c5817b4245a082564bccd877e0bb6990)
|
||||
- put date in the example [`a342219`](https://github.com/inspect-js/object-inspect/commit/a3422190eeaa013215f46df2d0d37b48595ac058)
|
||||
- passing the null test [`4ab737e`](https://github.com/inspect-js/object-inspect/commit/4ab737ebf862a75d247ebe51e79307a34d6380d4)
|
||||
|
||||
## [0.1.3](https://github.com/inspect-js/object-inspect/compare/0.1.1...0.1.3) - 2013-07-26
|
||||
|
||||
### Commits
|
||||
|
||||
- special isElement() check [`882768a`](https://github.com/inspect-js/object-inspect/commit/882768a54035d30747be9de1baf14e5aa0daa128)
|
||||
- oh right old IEs don't have indexOf either [`36d1275`](https://github.com/inspect-js/object-inspect/commit/36d12756c38b08a74370b0bb696c809e529913a5)
|
||||
|
||||
## [0.1.1](https://github.com/inspect-js/object-inspect/compare/0.1.0...0.1.1) - 2013-07-26
|
||||
|
||||
### Commits
|
||||
|
||||
- tests! [`4422fd9`](https://github.com/inspect-js/object-inspect/commit/4422fd95532c2745aa6c4f786f35f1090be29998)
|
||||
- fix for ie<9, doesn't have hasOwnProperty [`6b7d611`](https://github.com/inspect-js/object-inspect/commit/6b7d61183050f6da801ea04473211da226482613)
|
||||
- fix for all IEs: no f.name [`4e0c2f6`](https://github.com/inspect-js/object-inspect/commit/4e0c2f6dfd01c306d067d7163319acc97c94ee50)
|
||||
- badges [`5ed0d88`](https://github.com/inspect-js/object-inspect/commit/5ed0d88e4e407f9cb327fa4a146c17921f9680f3)
|
||||
|
||||
## [0.1.0](https://github.com/inspect-js/object-inspect/compare/0.0.0...0.1.0) - 2013-07-26
|
||||
|
||||
### Commits
|
||||
|
||||
- [Function] for functions [`ad5c485`](https://github.com/inspect-js/object-inspect/commit/ad5c485098fc83352cb540a60b2548ca56820e0b)
|
||||
|
||||
## 0.0.0 - 2013-07-26
|
||||
|
||||
### Commits
|
||||
|
||||
- working browser example [`34be6b6`](https://github.com/inspect-js/object-inspect/commit/34be6b6548f9ce92bdc3c27572857ba0c4a1218d)
|
||||
- package.json etc [`cad51f2`](https://github.com/inspect-js/object-inspect/commit/cad51f23fc6bcf1a456ed6abe16088256c2f632f)
|
||||
- docs complete [`b80cce2`](https://github.com/inspect-js/object-inspect/commit/b80cce2490c4e7183a9ee11ea89071f0abec4446)
|
||||
- circular example [`4b4a7b9`](https://github.com/inspect-js/object-inspect/commit/4b4a7b92209e4e6b4630976cb6bcd17d14165a59)
|
||||
- string rep [`7afb479`](https://github.com/inspect-js/object-inspect/commit/7afb479baa798d27f09e0a178b72ea327f60f5c8)
|
||||
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
|
||||
var resolveException = require("../lib/resolve-exception")
|
||||
, is = require("./is");
|
||||
|
||||
module.exports = function (value/*, options*/) {
|
||||
if (is(value)) return value;
|
||||
return resolveException(value, "%v is not a regular expression object", arguments[1]);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = 'wtf';
|
||||
@@ -0,0 +1,32 @@
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var regexExec = require('call-bind/callBound')('RegExp.prototype.exec');
|
||||
|
||||
var Call = require('./Call');
|
||||
var Get = require('./Get');
|
||||
var IsCallable = require('./IsCallable');
|
||||
var Type = require('./Type');
|
||||
|
||||
// https://262.ecma-international.org/6.0/#sec-regexpexec
|
||||
|
||||
module.exports = function RegExpExec(R, S) {
|
||||
if (Type(R) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: `R` must be an Object');
|
||||
}
|
||||
if (Type(S) !== 'String') {
|
||||
throw new $TypeError('Assertion failed: `S` must be a String');
|
||||
}
|
||||
var exec = Get(R, 'exec');
|
||||
if (IsCallable(exec)) {
|
||||
var result = Call(exec, R, [S]);
|
||||
if (result === null || Type(result) === 'Object') {
|
||||
return result;
|
||||
}
|
||||
throw new $TypeError('"exec" method must return `null` or an Object');
|
||||
}
|
||||
return regexExec(R, S);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = require("./lib/_stream_transform.js")
|
||||
@@ -0,0 +1 @@
|
||||
{"name":"proto-list","version":"1.2.4","files":{"LICENSE":{"checkedAt":1678883670198,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"package.json":{"checkedAt":1678883672771,"integrity":"sha512-P89fZQHlvUyxCYkq3TnMlQLSqkyMZJNsIj293rdjPore65KhlZDL//uwx9I3uyVKQe9THtxNcz3m0F7ZTXblew==","mode":420,"size":409},"README.md":{"checkedAt":1678883672771,"integrity":"sha512-4ARdWBi5cNK7/2/gJATIZM/GoR5c2KHpjlRYIhL8hm+fXrChpPAC2OzCdf98cCyJoujuxfIsrpqZcbCvuRI/MQ==","mode":420,"size":80},"proto-list.js":{"checkedAt":1678883672776,"integrity":"sha512-ZYAreAyqACaJJLEBJJdmzjc6RIHhhtc4rwNrfuS0GsmKBiBX54DMKr5po86rCNIjFya8gW6Bnzsze6zhuhhrgA==","mode":420,"size":2275},"test/basic.js":{"checkedAt":1678883672776,"integrity":"sha512-TP23vWgStrFTlro8fa3ZdRjMi2JCc4SRCMmDi6j9pF4T9MaDQHiotW3mp4Pq7yi0B1WGfG9bvdd4DRq3pTxciA==","mode":420,"size":1327}}}
|
||||
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=AnyCatcher.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"windowCount.js","sourceRoot":"","sources":["../../../../src/internal/operators/windowCount.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,sCAAqC;AAErC,qCAAuC;AACvC,2DAAgE;AAgEhE,SAAgB,WAAW,CAAI,UAAkB,EAAE,gBAA4B;IAA5B,iCAAA,EAAA,oBAA4B;IAC7E,IAAM,UAAU,GAAG,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,UAAU,CAAC;IAExE,OAAO,cAAO,CAAC,UAAC,MAAM,EAAE,UAAU;QAChC,IAAI,OAAO,GAAG,CAAC,IAAI,iBAAO,EAAK,CAAC,CAAC;QACjC,IAAI,MAAM,GAAa,EAAE,CAAC;QAC1B,IAAI,KAAK,GAAG,CAAC,CAAC;QAGd,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;QAE3C,MAAM,CAAC,SAAS,CACd,6CAAwB,CACtB,UAAU,EACV,UAAC,KAAQ;;;gBAIP,KAAqB,IAAA,YAAA,SAAA,OAAO,CAAA,gCAAA,qDAAE;oBAAzB,IAAM,QAAM,oBAAA;oBACf,QAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;iBACpB;;;;;;;;;YAMD,IAAM,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,UAAU,KAAK,CAAC,EAAE;gBAClC,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YAOD,IAAI,EAAE,KAAK,GAAG,UAAU,KAAK,CAAC,EAAE;gBAC9B,IAAM,QAAM,GAAG,IAAI,iBAAO,EAAK,CAAC;gBAChC,OAAO,CAAC,IAAI,CAAC,QAAM,CAAC,CAAC;gBACrB,UAAU,CAAC,IAAI,CAAC,QAAM,CAAC,YAAY,EAAE,CAAC,CAAC;aACxC;QACH,CAAC,EACD;YACE,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,QAAQ,EAAE,CAAC;aAC7B;YACD,UAAU,CAAC,QAAQ,EAAE,CAAC;QACxB,CAAC,EACD,UAAC,GAAG;YACF,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;gBACzB,OAAO,CAAC,KAAK,EAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aAC7B;YACD,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC,EACD;YACE,MAAM,GAAG,IAAK,CAAC;YACf,OAAO,GAAG,IAAK,CAAC;QAClB,CAAC,CACF,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA7DD,kCA6DC"}
|
||||
@@ -0,0 +1,191 @@
|
||||
import { Type, YAMLSyntaxError } from './util'
|
||||
|
||||
export default function parseCST(str: string): ParsedCST
|
||||
|
||||
export interface ParsedCST extends Array<CST.Document> {
|
||||
setOrigRanges(): boolean
|
||||
}
|
||||
|
||||
export namespace CST {
|
||||
interface Range {
|
||||
start: number
|
||||
end: number
|
||||
origStart?: number
|
||||
origEnd?: number
|
||||
isEmpty(): boolean
|
||||
}
|
||||
|
||||
interface ParseContext {
|
||||
/** Node starts at beginning of line */
|
||||
atLineStart: boolean
|
||||
/** true if currently in a collection context */
|
||||
inCollection: boolean
|
||||
/** true if currently in a flow context */
|
||||
inFlow: boolean
|
||||
/** Current level of indentation */
|
||||
indent: number
|
||||
/** Start of the current line */
|
||||
lineStart: number
|
||||
/** The parent of the node */
|
||||
parent: Node
|
||||
/** Source of the YAML document */
|
||||
src: string
|
||||
}
|
||||
|
||||
interface Node {
|
||||
context: ParseContext | null
|
||||
/** if not null, indicates a parser failure */
|
||||
error: YAMLSyntaxError | null
|
||||
/** span of context.src parsed into this node */
|
||||
range: Range | null
|
||||
valueRange: Range | null
|
||||
/** anchors, tags and comments */
|
||||
props: Range[]
|
||||
/** specific node type */
|
||||
type: Type
|
||||
/** if non-null, overrides source value */
|
||||
value: string | null
|
||||
|
||||
readonly anchor: string | null
|
||||
readonly comment: string | null
|
||||
readonly hasComment: boolean
|
||||
readonly hasProps: boolean
|
||||
readonly jsonLike: boolean
|
||||
readonly rangeAsLinePos: null | {
|
||||
start: { line: number; col: number }
|
||||
end?: { line: number; col: number }
|
||||
}
|
||||
readonly rawValue: string | null
|
||||
readonly tag:
|
||||
| null
|
||||
| { verbatim: string }
|
||||
| { handle: string; suffix: string }
|
||||
readonly valueRangeContainsNewline: boolean
|
||||
}
|
||||
|
||||
interface Alias extends Node {
|
||||
type: Type.ALIAS
|
||||
/** contain the anchor without the * prefix */
|
||||
readonly rawValue: string
|
||||
}
|
||||
|
||||
type Scalar = BlockValue | PlainValue | QuoteValue
|
||||
|
||||
interface BlockValue extends Node {
|
||||
type: Type.BLOCK_FOLDED | Type.BLOCK_LITERAL
|
||||
chomping: 'CLIP' | 'KEEP' | 'STRIP'
|
||||
blockIndent: number | null
|
||||
header: Range
|
||||
readonly strValue: string | null
|
||||
}
|
||||
|
||||
interface BlockFolded extends BlockValue {
|
||||
type: Type.BLOCK_FOLDED
|
||||
}
|
||||
|
||||
interface BlockLiteral extends BlockValue {
|
||||
type: Type.BLOCK_LITERAL
|
||||
}
|
||||
|
||||
interface PlainValue extends Node {
|
||||
type: Type.PLAIN
|
||||
readonly strValue: string | null
|
||||
}
|
||||
|
||||
interface QuoteValue extends Node {
|
||||
type: Type.QUOTE_DOUBLE | Type.QUOTE_SINGLE
|
||||
readonly strValue:
|
||||
| null
|
||||
| string
|
||||
| { str: string; errors: YAMLSyntaxError[] }
|
||||
}
|
||||
|
||||
interface QuoteDouble extends QuoteValue {
|
||||
type: Type.QUOTE_DOUBLE
|
||||
}
|
||||
|
||||
interface QuoteSingle extends QuoteValue {
|
||||
type: Type.QUOTE_SINGLE
|
||||
}
|
||||
|
||||
interface Comment extends Node {
|
||||
type: Type.COMMENT
|
||||
readonly anchor: null
|
||||
readonly comment: string
|
||||
readonly rawValue: null
|
||||
readonly tag: null
|
||||
}
|
||||
|
||||
interface BlankLine extends Node {
|
||||
type: Type.BLANK_LINE
|
||||
}
|
||||
|
||||
interface MapItem extends Node {
|
||||
type: Type.MAP_KEY | Type.MAP_VALUE
|
||||
node: ContentNode | null
|
||||
}
|
||||
|
||||
interface MapKey extends MapItem {
|
||||
type: Type.MAP_KEY
|
||||
}
|
||||
|
||||
interface MapValue extends MapItem {
|
||||
type: Type.MAP_VALUE
|
||||
}
|
||||
|
||||
interface Map extends Node {
|
||||
type: Type.MAP
|
||||
/** implicit keys are not wrapped */
|
||||
items: Array<BlankLine | Comment | Alias | Scalar | MapItem>
|
||||
}
|
||||
|
||||
interface SeqItem extends Node {
|
||||
type: Type.SEQ_ITEM
|
||||
node: ContentNode | null
|
||||
}
|
||||
|
||||
interface Seq extends Node {
|
||||
type: Type.SEQ
|
||||
items: Array<BlankLine | Comment | SeqItem>
|
||||
}
|
||||
|
||||
interface FlowChar {
|
||||
char: '{' | '}' | '[' | ']' | ',' | '?' | ':'
|
||||
offset: number
|
||||
origOffset?: number
|
||||
}
|
||||
|
||||
interface FlowCollection extends Node {
|
||||
type: Type.FLOW_MAP | Type.FLOW_SEQ
|
||||
items: Array<
|
||||
FlowChar | BlankLine | Comment | Alias | Scalar | FlowCollection
|
||||
>
|
||||
}
|
||||
|
||||
interface FlowMap extends FlowCollection {
|
||||
type: Type.FLOW_MAP
|
||||
}
|
||||
|
||||
interface FlowSeq extends FlowCollection {
|
||||
type: Type.FLOW_SEQ
|
||||
}
|
||||
|
||||
type ContentNode = Alias | Scalar | Map | Seq | FlowCollection
|
||||
|
||||
interface Directive extends Node {
|
||||
type: Type.DIRECTIVE
|
||||
name: string
|
||||
readonly anchor: null
|
||||
readonly parameters: string[]
|
||||
readonly tag: null
|
||||
}
|
||||
|
||||
interface Document extends Node {
|
||||
type: Type.DOCUMENT
|
||||
directives: Array<BlankLine | Comment | Directive>
|
||||
contents: Array<BlankLine | Comment | ContentNode>
|
||||
readonly anchor: null
|
||||
readonly comment: null
|
||||
readonly tag: null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,320 @@
|
||||
# Change Log
|
||||
|
||||
## 1.0.2
|
||||
|
||||
* Add types for path imports ([#13](https://github.com/7rulnik/source-map-js/pull/13)) [@TrySound](https://github.com/TrySound)
|
||||
|
||||
## 1.0.1
|
||||
|
||||
* Remove cleanComments optimization ([#10](https://github.com/7rulnik/source-map-js/pull/10)) [@ai](https://github.com/ai)
|
||||
|
||||
## 1.0.0
|
||||
|
||||
* Fix package.json#typings field ([#6](https://github.com/7rulnik/source-map-js/pull/6)) [@chalkygames123](https://github.com/chalkygames123)
|
||||
|
||||
* Reduce memory usage of eachMapping w/ loop ([#5](https://github.com/7rulnik/source-map-js/pull/5)) [@noppa](https://github.com/noppa)
|
||||
|
||||
* Reduce npm package size ([#7](https://github.com/7rulnik/source-map-js/pull/7)) [@ai](https://github.com/ai)
|
||||
|
||||
----------
|
||||
# It doesn't related to this fork:
|
||||
|
||||
## 0.5.6
|
||||
|
||||
* Fix for regression when people were using numbers as names in source maps. See
|
||||
#236.
|
||||
|
||||
## 0.5.5
|
||||
|
||||
* Fix "regression" of unsupported, implementation behavior that half the world
|
||||
happens to have come to depend on. See #235.
|
||||
|
||||
* Fix regression involving function hoisting in SpiderMonkey. See #233.
|
||||
|
||||
## 0.5.4
|
||||
|
||||
* Large performance improvements to source-map serialization. See #228 and #229.
|
||||
|
||||
## 0.5.3
|
||||
|
||||
* Do not include unnecessary distribution files. See
|
||||
commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86.
|
||||
|
||||
## 0.5.2
|
||||
|
||||
* Include browser distributions of the library in package.json's `files`. See
|
||||
issue #212.
|
||||
|
||||
## 0.5.1
|
||||
|
||||
* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See
|
||||
ff05274becc9e6e1295ed60f3ea090d31d843379.
|
||||
|
||||
## 0.5.0
|
||||
|
||||
* Node 0.8 is no longer supported.
|
||||
|
||||
* Use webpack instead of dryice for bundling.
|
||||
|
||||
* Big speedups serializing source maps. See pull request #203.
|
||||
|
||||
* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that
|
||||
explicitly start with the source root. See issue #199.
|
||||
|
||||
## 0.4.4
|
||||
|
||||
* Fix an issue where using a `SourceMapGenerator` after having created a
|
||||
`SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See
|
||||
issue #191.
|
||||
|
||||
* Fix an issue with where `SourceMapGenerator` would mistakenly consider
|
||||
different mappings as duplicates of each other and avoid generating them. See
|
||||
issue #192.
|
||||
|
||||
## 0.4.3
|
||||
|
||||
* A very large number of performance improvements, particularly when parsing
|
||||
source maps. Collectively about 75% of time shaved off of the source map
|
||||
parsing benchmark!
|
||||
|
||||
* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy
|
||||
searching in the presence of a column option. See issue #177.
|
||||
|
||||
* Fix a bug with joining a source and its source root when the source is above
|
||||
the root. See issue #182.
|
||||
|
||||
* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to
|
||||
determine when all sources' contents are inlined into the source map. See
|
||||
issue #190.
|
||||
|
||||
## 0.4.2
|
||||
|
||||
* Add an `.npmignore` file so that the benchmarks aren't pulled down by
|
||||
dependent projects. Issue #169.
|
||||
|
||||
* Add an optional `column` argument to
|
||||
`SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines
|
||||
with no mappings. Issues #172 and #173.
|
||||
|
||||
## 0.4.1
|
||||
|
||||
* Fix accidentally defining a global variable. #170.
|
||||
|
||||
## 0.4.0
|
||||
|
||||
* The default direction for fuzzy searching was changed back to its original
|
||||
direction. See #164.
|
||||
|
||||
* There is now a `bias` option you can supply to `SourceMapConsumer` to control
|
||||
the fuzzy searching direction. See #167.
|
||||
|
||||
* About an 8% speed up in parsing source maps. See #159.
|
||||
|
||||
* Added a benchmark for parsing and generating source maps.
|
||||
|
||||
## 0.3.0
|
||||
|
||||
* Change the default direction that searching for positions fuzzes when there is
|
||||
not an exact match. See #154.
|
||||
|
||||
* Support for environments using json2.js for JSON serialization. See #156.
|
||||
|
||||
## 0.2.0
|
||||
|
||||
* Support for consuming "indexed" source maps which do not have any remote
|
||||
sections. See pull request #127. This introduces a minor backwards
|
||||
incompatibility if you are monkey patching `SourceMapConsumer.prototype`
|
||||
methods.
|
||||
|
||||
## 0.1.43
|
||||
|
||||
* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue
|
||||
#148 for some discussion and issues #150, #151, and #152 for implementations.
|
||||
|
||||
## 0.1.42
|
||||
|
||||
* Fix an issue where `SourceNode`s from different versions of the source-map
|
||||
library couldn't be used in conjunction with each other. See issue #142.
|
||||
|
||||
## 0.1.41
|
||||
|
||||
* Fix a bug with getting the source content of relative sources with a "./"
|
||||
prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768).
|
||||
|
||||
* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the
|
||||
column span of each mapping.
|
||||
|
||||
* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find
|
||||
all generated positions associated with a given original source and line.
|
||||
|
||||
## 0.1.40
|
||||
|
||||
* Performance improvements for parsing source maps in SourceMapConsumer.
|
||||
|
||||
## 0.1.39
|
||||
|
||||
* Fix a bug where setting a source's contents to null before any source content
|
||||
had been set before threw a TypeError. See issue #131.
|
||||
|
||||
## 0.1.38
|
||||
|
||||
* Fix a bug where finding relative paths from an empty path were creating
|
||||
absolute paths. See issue #129.
|
||||
|
||||
## 0.1.37
|
||||
|
||||
* Fix a bug where if the source root was an empty string, relative source paths
|
||||
would turn into absolute source paths. Issue #124.
|
||||
|
||||
## 0.1.36
|
||||
|
||||
* Allow the `names` mapping property to be an empty string. Issue #121.
|
||||
|
||||
## 0.1.35
|
||||
|
||||
* A third optional parameter was added to `SourceNode.fromStringWithSourceMap`
|
||||
to specify a path that relative sources in the second parameter should be
|
||||
relative to. Issue #105.
|
||||
|
||||
* If no file property is given to a `SourceMapGenerator`, then the resulting
|
||||
source map will no longer have a `null` file property. The property will
|
||||
simply not exist. Issue #104.
|
||||
|
||||
* Fixed a bug where consecutive newlines were ignored in `SourceNode`s.
|
||||
Issue #116.
|
||||
|
||||
## 0.1.34
|
||||
|
||||
* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103.
|
||||
|
||||
* Fix bug involving source contents and the
|
||||
`SourceMapGenerator.prototype.applySourceMap`. Issue #100.
|
||||
|
||||
## 0.1.33
|
||||
|
||||
* Fix some edge cases surrounding path joining and URL resolution.
|
||||
|
||||
* Add a third parameter for relative path to
|
||||
`SourceMapGenerator.prototype.applySourceMap`.
|
||||
|
||||
* Fix issues with mappings and EOLs.
|
||||
|
||||
## 0.1.32
|
||||
|
||||
* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns
|
||||
(issue 92).
|
||||
|
||||
* Fixed test runner to actually report number of failed tests as its process
|
||||
exit code.
|
||||
|
||||
* Fixed a typo when reporting bad mappings (issue 87).
|
||||
|
||||
## 0.1.31
|
||||
|
||||
* Delay parsing the mappings in SourceMapConsumer until queried for a source
|
||||
location.
|
||||
|
||||
* Support Sass source maps (which at the time of writing deviate from the spec
|
||||
in small ways) in SourceMapConsumer.
|
||||
|
||||
## 0.1.30
|
||||
|
||||
* Do not join source root with a source, when the source is a data URI.
|
||||
|
||||
* Extend the test runner to allow running single specific test files at a time.
|
||||
|
||||
* Performance improvements in `SourceNode.prototype.walk` and
|
||||
`SourceMapConsumer.prototype.eachMapping`.
|
||||
|
||||
* Source map browser builds will now work inside Workers.
|
||||
|
||||
* Better error messages when attempting to add an invalid mapping to a
|
||||
`SourceMapGenerator`.
|
||||
|
||||
## 0.1.29
|
||||
|
||||
* Allow duplicate entries in the `names` and `sources` arrays of source maps
|
||||
(usually from TypeScript) we are parsing. Fixes github issue 72.
|
||||
|
||||
## 0.1.28
|
||||
|
||||
* Skip duplicate mappings when creating source maps from SourceNode; github
|
||||
issue 75.
|
||||
|
||||
## 0.1.27
|
||||
|
||||
* Don't throw an error when the `file` property is missing in SourceMapConsumer,
|
||||
we don't use it anyway.
|
||||
|
||||
## 0.1.26
|
||||
|
||||
* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70.
|
||||
|
||||
## 0.1.25
|
||||
|
||||
* Make compatible with browserify
|
||||
|
||||
## 0.1.24
|
||||
|
||||
* Fix issue with absolute paths and `file://` URIs. See
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=885597
|
||||
|
||||
## 0.1.23
|
||||
|
||||
* Fix issue with absolute paths and sourcesContent, github issue 64.
|
||||
|
||||
## 0.1.22
|
||||
|
||||
* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21.
|
||||
|
||||
## 0.1.21
|
||||
|
||||
* Fixed handling of sources that start with a slash so that they are relative to
|
||||
the source root's host.
|
||||
|
||||
## 0.1.20
|
||||
|
||||
* Fixed github issue #43: absolute URLs aren't joined with the source root
|
||||
anymore.
|
||||
|
||||
## 0.1.19
|
||||
|
||||
* Using Travis CI to run tests.
|
||||
|
||||
## 0.1.18
|
||||
|
||||
* Fixed a bug in the handling of sourceRoot.
|
||||
|
||||
## 0.1.17
|
||||
|
||||
* Added SourceNode.fromStringWithSourceMap.
|
||||
|
||||
## 0.1.16
|
||||
|
||||
* Added missing documentation.
|
||||
|
||||
* Fixed the generating of empty mappings in SourceNode.
|
||||
|
||||
## 0.1.15
|
||||
|
||||
* Added SourceMapGenerator.applySourceMap.
|
||||
|
||||
## 0.1.14
|
||||
|
||||
* The sourceRoot is now handled consistently.
|
||||
|
||||
## 0.1.13
|
||||
|
||||
* Added SourceMapGenerator.fromSourceMap.
|
||||
|
||||
## 0.1.12
|
||||
|
||||
* SourceNode now generates empty mappings too.
|
||||
|
||||
## 0.1.11
|
||||
|
||||
* Added name support to SourceNode.
|
||||
|
||||
## 0.1.10
|
||||
|
||||
* Added sourcesContent support to the customer and generator.
|
||||
@@ -0,0 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('./async').forever;
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mapTo.js","sourceRoot":"","sources":["../../../../src/internal/operators/mapTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AA4C5B,MAAM,UAAU,KAAK,CAAI,KAAQ;IAC/B,OAAO,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC"}
|
||||
@@ -0,0 +1,36 @@
|
||||
"use strict";
|
||||
|
||||
var assert = require("chai").assert
|
||||
, coerceToString = require("../../string/coerce");
|
||||
|
||||
describe("string/coerce", function () {
|
||||
it("Should return input string", function () { assert.equal(coerceToString("foo"), "foo"); });
|
||||
it("Should coerce numbers", function () { assert.equal(coerceToString(12), "12"); });
|
||||
it("Should coerce booleans", function () { assert.equal(coerceToString(true), "true"); });
|
||||
it("Should coerce string objects", function () {
|
||||
assert.equal(coerceToString(new String("bar")), "bar");
|
||||
});
|
||||
it("Should coerce objects", function () {
|
||||
assert.equal(
|
||||
coerceToString({ toString: function () { return "Some object"; } }), "Some object"
|
||||
);
|
||||
});
|
||||
if (typeof Object.create === "function") {
|
||||
it("Should not coerce objects with no toString", function () {
|
||||
assert.equal(coerceToString(Object.create(null)), null);
|
||||
});
|
||||
}
|
||||
it("Should not coerce objects with no custom toString", function () {
|
||||
assert.equal(coerceToString({}), null);
|
||||
});
|
||||
it("Should not coerce null", function () { assert.equal(coerceToString(null), null); });
|
||||
it("Should not coerce undefined", function () {
|
||||
assert.equal(coerceToString(undefined), null);
|
||||
});
|
||||
|
||||
if (typeof Symbol === "function") {
|
||||
it("Should not coerce symbols", function () {
|
||||
assert.equal(coerceToString(Symbol("foo")), null);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
import { createErrorClass } from './createErrorClass';
|
||||
export const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
||||
_super(this);
|
||||
this.name = 'ObjectUnsubscribedError';
|
||||
this.message = 'object unsubscribed';
|
||||
});
|
||||
//# sourceMappingURL=ObjectUnsubscribedError.js.map
|
||||
Reference in New Issue
Block a user