@dxos/node-std 0.6.11-staging.a542fc9 → 0.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/_/config.mjs +1 -1
- package/dist/lib/browser/assert.mjs +44 -80
- package/dist/lib/browser/assert.mjs.map +1 -1
- package/dist/lib/browser/buffer.mjs +2 -2
- package/dist/lib/browser/{chunk-MJPHVYKR.mjs → chunk-3QS3WKRC.mjs} +1 -1
- package/dist/lib/browser/{chunk-CMGRJ4FC.mjs → chunk-BBIU6VNW.mjs} +3 -3
- package/dist/lib/browser/{chunk-RGVVW7F2.mjs → chunk-EC477KOW.mjs} +19 -31
- package/dist/lib/browser/{chunk-RGVVW7F2.mjs.map → chunk-EC477KOW.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-HFGMGNFE.mjs → chunk-PY2IJ42L.mjs} +106 -210
- package/dist/lib/browser/{chunk-HFGMGNFE.mjs.map → chunk-PY2IJ42L.mjs.map} +1 -1
- package/dist/lib/browser/crypto.mjs +1 -1
- package/dist/lib/browser/events.mjs +4 -7
- package/dist/lib/browser/events.mjs.map +1 -1
- package/dist/lib/browser/fs/promises.mjs +1 -1
- package/dist/lib/browser/fs.mjs +1 -1
- package/dist/lib/browser/globals.mjs +3 -3
- package/dist/lib/browser/inject-globals.mjs +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/path.mjs +22 -43
- package/dist/lib/browser/path.mjs.map +1 -1
- package/dist/lib/browser/stream.mjs +1 -1
- package/dist/lib/browser/util.mjs +4 -4
- package/dist/lib/node/_/config.cjs +1 -1
- package/dist/lib/node/assert.cjs +1 -1
- package/dist/lib/node/buffer.cjs +3 -3
- package/dist/lib/node/{chunk-XUVUYQ27.cjs → chunk-6SZKM6EC.cjs} +5 -6
- package/dist/lib/node/chunk-6SZKM6EC.cjs.map +7 -0
- package/dist/lib/node/{chunk-LQSBC3HI.cjs → chunk-FCCITQEP.cjs} +125 -229
- package/dist/lib/node/{chunk-LQSBC3HI.cjs.map → chunk-FCCITQEP.cjs.map} +2 -2
- package/dist/lib/node/{chunk-D73VD6UV.cjs → chunk-NY4EGPUF.cjs} +4 -4
- package/dist/lib/node/crypto.cjs +1 -1
- package/dist/lib/node/events.cjs +1 -1
- package/dist/lib/node/fs/promises.cjs +1 -1
- package/dist/lib/node/fs.cjs +1 -1
- package/dist/lib/node/globals.cjs +3 -3
- package/dist/lib/node/globals.cjs.map +1 -1
- package/dist/lib/node/inject-globals.cjs +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/path.cjs +26 -47
- package/dist/lib/node/path.cjs.map +2 -2
- package/dist/lib/node/stream.cjs +1 -1
- package/dist/lib/node/util.cjs +157 -170
- package/dist/lib/node/util.cjs.map +2 -2
- package/package.json +1 -1
- package/dist/lib/node/chunk-XUVUYQ27.cjs.map +0 -7
- /package/dist/lib/browser/{chunk-MJPHVYKR.mjs.map → chunk-3QS3WKRC.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-CMGRJ4FC.mjs.map → chunk-BBIU6VNW.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-D73VD6UV.cjs.map → chunk-NY4EGPUF.cjs.map} +0 -0
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
require_define_data_property,
|
|
5
5
|
require_has_property_descriptors,
|
|
6
6
|
require_util
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EC477KOW.mjs";
|
|
8
8
|
import {
|
|
9
9
|
__commonJS,
|
|
10
10
|
__toESM
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3QS3WKRC.mjs";
|
|
12
12
|
|
|
13
13
|
// node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/errors.js
|
|
14
14
|
var require_errors = __commonJS({
|
|
@@ -54,8 +54,7 @@ var require_errors = __commonJS({
|
|
|
54
54
|
throw new TypeError("Super expression must either be null or a function");
|
|
55
55
|
}
|
|
56
56
|
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
57
|
-
if (superClass)
|
|
58
|
-
_setPrototypeOf(subClass, superClass);
|
|
57
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
59
58
|
}
|
|
60
59
|
function _setPrototypeOf(o, p) {
|
|
61
60
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
|
|
@@ -129,8 +128,7 @@ var require_errors = __commonJS({
|
|
|
129
128
|
}
|
|
130
129
|
createErrorType("ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError);
|
|
131
130
|
createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
|
|
132
|
-
if (assert2 === void 0)
|
|
133
|
-
assert2 = require_assert();
|
|
131
|
+
if (assert2 === void 0) assert2 = require_assert();
|
|
134
132
|
assert2(typeof name === "string", "'name' must be a string");
|
|
135
133
|
var determiner;
|
|
136
134
|
if (typeof expected === "string" && startsWith(expected, "not ")) {
|
|
@@ -151,8 +149,7 @@ var require_errors = __commonJS({
|
|
|
151
149
|
}, TypeError);
|
|
152
150
|
createErrorType("ERR_INVALID_ARG_VALUE", function(name, value) {
|
|
153
151
|
var reason = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "is invalid";
|
|
154
|
-
if (util === void 0)
|
|
155
|
-
util = require_util();
|
|
152
|
+
if (util === void 0) util = require_util();
|
|
156
153
|
var inspected = util.inspect(value);
|
|
157
154
|
if (inspected.length > 128) {
|
|
158
155
|
inspected = "".concat(inspected.slice(0, 128), "...");
|
|
@@ -172,8 +169,7 @@ var require_errors = __commonJS({
|
|
|
172
169
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
173
170
|
args[_key] = arguments[_key];
|
|
174
171
|
}
|
|
175
|
-
if (assert2 === void 0)
|
|
176
|
-
assert2 = require_assert();
|
|
172
|
+
if (assert2 === void 0) assert2 = require_assert();
|
|
177
173
|
assert2(args.length > 0, "At least one arg needs to be specified");
|
|
178
174
|
var msg = "The ";
|
|
179
175
|
var len = args.length;
|
|
@@ -235,16 +231,13 @@ var require_assertion_error = __commonJS({
|
|
|
235
231
|
var descriptor = props[i];
|
|
236
232
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
237
233
|
descriptor.configurable = true;
|
|
238
|
-
if ("value" in descriptor)
|
|
239
|
-
descriptor.writable = true;
|
|
234
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
240
235
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
241
236
|
}
|
|
242
237
|
}
|
|
243
238
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
244
|
-
if (protoProps)
|
|
245
|
-
|
|
246
|
-
if (staticProps)
|
|
247
|
-
_defineProperties(Constructor, staticProps);
|
|
239
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
240
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
248
241
|
return Constructor;
|
|
249
242
|
}
|
|
250
243
|
function _possibleConstructorReturn(self, call) {
|
|
@@ -264,20 +257,17 @@ var require_assertion_error = __commonJS({
|
|
|
264
257
|
throw new TypeError("Super expression must either be null or a function");
|
|
265
258
|
}
|
|
266
259
|
subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
|
|
267
|
-
if (superClass)
|
|
268
|
-
_setPrototypeOf(subClass, superClass);
|
|
260
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
269
261
|
}
|
|
270
262
|
function _wrapNativeSuper(Class) {
|
|
271
263
|
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
272
264
|
_wrapNativeSuper = function _wrapNativeSuper2(Class2) {
|
|
273
|
-
if (Class2 === null || !_isNativeFunction(Class2))
|
|
274
|
-
return Class2;
|
|
265
|
+
if (Class2 === null || !_isNativeFunction(Class2)) return Class2;
|
|
275
266
|
if (typeof Class2 !== "function") {
|
|
276
267
|
throw new TypeError("Super expression must either be null or a function");
|
|
277
268
|
}
|
|
278
269
|
if (typeof _cache !== "undefined") {
|
|
279
|
-
if (_cache.has(Class2))
|
|
280
|
-
return _cache.get(Class2);
|
|
270
|
+
if (_cache.has(Class2)) return _cache.get(Class2);
|
|
281
271
|
_cache.set(Class2, Wrapper);
|
|
282
272
|
}
|
|
283
273
|
function Wrapper() {
|
|
@@ -289,12 +279,9 @@ var require_assertion_error = __commonJS({
|
|
|
289
279
|
return _wrapNativeSuper(Class);
|
|
290
280
|
}
|
|
291
281
|
function isNativeReflectConstruct() {
|
|
292
|
-
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
293
|
-
|
|
294
|
-
if (
|
|
295
|
-
return false;
|
|
296
|
-
if (typeof Proxy === "function")
|
|
297
|
-
return true;
|
|
282
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
283
|
+
if (Reflect.construct.sham) return false;
|
|
284
|
+
if (typeof Proxy === "function") return true;
|
|
298
285
|
try {
|
|
299
286
|
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
300
287
|
}));
|
|
@@ -312,8 +299,7 @@ var require_assertion_error = __commonJS({
|
|
|
312
299
|
a.push.apply(a, args2);
|
|
313
300
|
var Constructor = Function.bind.apply(Parent2, a);
|
|
314
301
|
var instance = new Constructor();
|
|
315
|
-
if (Class2)
|
|
316
|
-
_setPrototypeOf(instance, Class2.prototype);
|
|
302
|
+
if (Class2) _setPrototypeOf(instance, Class2.prototype);
|
|
317
303
|
return instance;
|
|
318
304
|
};
|
|
319
305
|
}
|
|
@@ -359,8 +345,7 @@ var require_assertion_error = __commonJS({
|
|
|
359
345
|
}
|
|
360
346
|
function repeat(str, count) {
|
|
361
347
|
count = Math.floor(count);
|
|
362
|
-
if (str.length == 0 || count == 0)
|
|
363
|
-
return "";
|
|
348
|
+
if (str.length == 0 || count == 0) return "";
|
|
364
349
|
var maxCount = str.length * count;
|
|
365
350
|
count = Math.floor(Math.log(count) / Math.log(2));
|
|
366
351
|
while (count) {
|
|
@@ -463,8 +448,7 @@ var require_assertion_error = __commonJS({
|
|
|
463
448
|
}
|
|
464
449
|
actualLines.pop();
|
|
465
450
|
expectedLines.pop();
|
|
466
|
-
if (actualLines.length === 0 || expectedLines.length === 0)
|
|
467
|
-
break;
|
|
451
|
+
if (actualLines.length === 0 || expectedLines.length === 0) break;
|
|
468
452
|
a = actualLines[actualLines.length - 1];
|
|
469
453
|
b = expectedLines[expectedLines.length - 1];
|
|
470
454
|
}
|
|
@@ -1094,26 +1078,22 @@ var require_comparisons = __commonJS({
|
|
|
1094
1078
|
try {
|
|
1095
1079
|
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
1096
1080
|
_arr.push(_s.value);
|
|
1097
|
-
if (i && _arr.length === i)
|
|
1098
|
-
break;
|
|
1081
|
+
if (i && _arr.length === i) break;
|
|
1099
1082
|
}
|
|
1100
1083
|
} catch (err) {
|
|
1101
1084
|
_d = true;
|
|
1102
1085
|
_e = err;
|
|
1103
1086
|
} finally {
|
|
1104
1087
|
try {
|
|
1105
|
-
if (!_n && _i["return"] != null)
|
|
1106
|
-
_i["return"]();
|
|
1088
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
1107
1089
|
} finally {
|
|
1108
|
-
if (_d)
|
|
1109
|
-
throw _e;
|
|
1090
|
+
if (_d) throw _e;
|
|
1110
1091
|
}
|
|
1111
1092
|
}
|
|
1112
1093
|
return _arr;
|
|
1113
1094
|
}
|
|
1114
1095
|
function _arrayWithHoles(arr) {
|
|
1115
|
-
if (Array.isArray(arr))
|
|
1116
|
-
return arr;
|
|
1096
|
+
if (Array.isArray(arr)) return arr;
|
|
1117
1097
|
}
|
|
1118
1098
|
function _typeof(obj) {
|
|
1119
1099
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
@@ -1170,12 +1150,10 @@ var require_comparisons = __commonJS({
|
|
|
1170
1150
|
var isFloat32Array = _require$types.isFloat32Array;
|
|
1171
1151
|
var isFloat64Array = _require$types.isFloat64Array;
|
|
1172
1152
|
function isNonIndex(key) {
|
|
1173
|
-
if (key.length === 0 || key.length > 10)
|
|
1174
|
-
return true;
|
|
1153
|
+
if (key.length === 0 || key.length > 10) return true;
|
|
1175
1154
|
for (var i = 0; i < key.length; i++) {
|
|
1176
1155
|
var code = key.charCodeAt(i);
|
|
1177
|
-
if (code < 48 || code > 57)
|
|
1178
|
-
return true;
|
|
1156
|
+
if (code < 48 || code > 57) return true;
|
|
1179
1157
|
}
|
|
1180
1158
|
return key.length === 10 && key >= Math.pow(2, 32);
|
|
1181
1159
|
}
|
|
@@ -1250,8 +1228,7 @@ var require_comparisons = __commonJS({
|
|
|
1250
1228
|
}
|
|
1251
1229
|
function innerDeepEqual(val1, val2, strict, memos) {
|
|
1252
1230
|
if (val1 === val2) {
|
|
1253
|
-
if (val1 !== 0)
|
|
1254
|
-
return true;
|
|
1231
|
+
if (val1 !== 0) return true;
|
|
1255
1232
|
return strict ? objectIs(val1, val2) : true;
|
|
1256
1233
|
}
|
|
1257
1234
|
if (strict) {
|
|
@@ -1434,6 +1411,9 @@ var require_comparisons = __commonJS({
|
|
|
1434
1411
|
return false;
|
|
1435
1412
|
case "string":
|
|
1436
1413
|
prim = +prim;
|
|
1414
|
+
// Loose equal entries exist only if the string is possible to convert to
|
|
1415
|
+
// a regular number and not NaN.
|
|
1416
|
+
// Fall through
|
|
1437
1417
|
case "number":
|
|
1438
1418
|
if (numberIsNaN(prim)) {
|
|
1439
1419
|
return false;
|
|
@@ -1443,8 +1423,7 @@ var require_comparisons = __commonJS({
|
|
|
1443
1423
|
}
|
|
1444
1424
|
function setMightHaveLoosePrim(a, b, prim) {
|
|
1445
1425
|
var altValue = findLooseMatchingPrimitives(prim);
|
|
1446
|
-
if (altValue != null)
|
|
1447
|
-
return altValue;
|
|
1426
|
+
if (altValue != null) return altValue;
|
|
1448
1427
|
return b.has(altValue) && !a.has(altValue);
|
|
1449
1428
|
}
|
|
1450
1429
|
function mapMightHaveLoosePrim(a, b, prim, item, memo) {
|
|
@@ -1469,8 +1448,7 @@ var require_comparisons = __commonJS({
|
|
|
1469
1448
|
}
|
|
1470
1449
|
set.add(val);
|
|
1471
1450
|
} else if (!b.has(val)) {
|
|
1472
|
-
if (strict)
|
|
1473
|
-
return false;
|
|
1451
|
+
if (strict) return false;
|
|
1474
1452
|
if (!setMightHaveLoosePrim(a, b, val)) {
|
|
1475
1453
|
return false;
|
|
1476
1454
|
}
|
|
@@ -1485,8 +1463,7 @@ var require_comparisons = __commonJS({
|
|
|
1485
1463
|
for (var _i = 0; _i < bValues.length; _i++) {
|
|
1486
1464
|
var _val = bValues[_i];
|
|
1487
1465
|
if (_typeof(_val) === "object" && _val !== null) {
|
|
1488
|
-
if (!setHasEqualElement(set, _val, strict, memo))
|
|
1489
|
-
return false;
|
|
1466
|
+
if (!setHasEqualElement(set, _val, strict, memo)) return false;
|
|
1490
1467
|
} else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {
|
|
1491
1468
|
return false;
|
|
1492
1469
|
}
|
|
@@ -1519,10 +1496,8 @@ var require_comparisons = __commonJS({
|
|
|
1519
1496
|
} else {
|
|
1520
1497
|
var item2 = b.get(key);
|
|
1521
1498
|
if (item2 === void 0 && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {
|
|
1522
|
-
if (strict)
|
|
1523
|
-
|
|
1524
|
-
if (!mapMightHaveLoosePrim(a, b, key, item1, memo))
|
|
1525
|
-
return false;
|
|
1499
|
+
if (strict) return false;
|
|
1500
|
+
if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;
|
|
1526
1501
|
if (set === null) {
|
|
1527
1502
|
set = /* @__PURE__ */ new Set();
|
|
1528
1503
|
}
|
|
@@ -1535,8 +1510,7 @@ var require_comparisons = __commonJS({
|
|
|
1535
1510
|
for (var _i2 = 0; _i2 < bEntries.length; _i2++) {
|
|
1536
1511
|
var _bEntries$_i = _slicedToArray(bEntries[_i2], 2), key = _bEntries$_i[0], item = _bEntries$_i[1];
|
|
1537
1512
|
if (_typeof(key) === "object" && key !== null) {
|
|
1538
|
-
if (!mapHasEqualEntry(set, a, key, item, strict, memo))
|
|
1539
|
-
return false;
|
|
1513
|
+
if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false;
|
|
1540
1514
|
} else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {
|
|
1541
1515
|
return false;
|
|
1542
1516
|
}
|
|
@@ -1646,8 +1620,7 @@ var require_assert = __commonJS({
|
|
|
1646
1620
|
var assert2 = module.exports = ok;
|
|
1647
1621
|
var NO_EXCEPTION_SENTINEL = {};
|
|
1648
1622
|
function innerFail(obj) {
|
|
1649
|
-
if (obj.message instanceof Error)
|
|
1650
|
-
throw obj.message;
|
|
1623
|
+
if (obj.message instanceof Error) throw obj.message;
|
|
1651
1624
|
throw new AssertionError(obj);
|
|
1652
1625
|
}
|
|
1653
1626
|
function fail(actual, expected, message, operator, stackStartFn) {
|
|
@@ -1664,11 +1637,9 @@ var require_assert = __commonJS({
|
|
|
1664
1637
|
var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);
|
|
1665
1638
|
warn("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094");
|
|
1666
1639
|
}
|
|
1667
|
-
if (argsLen === 2)
|
|
1668
|
-
operator = "!=";
|
|
1640
|
+
if (argsLen === 2) operator = "!=";
|
|
1669
1641
|
}
|
|
1670
|
-
if (message instanceof Error)
|
|
1671
|
-
throw message;
|
|
1642
|
+
if (message instanceof Error) throw message;
|
|
1672
1643
|
var errArgs = {
|
|
1673
1644
|
actual,
|
|
1674
1645
|
expected,
|
|
@@ -1746,8 +1717,7 @@ var require_assert = __commonJS({
|
|
|
1746
1717
|
if (arguments.length < 2) {
|
|
1747
1718
|
throw new ERR_MISSING_ARGS("actual", "expected");
|
|
1748
1719
|
}
|
|
1749
|
-
if (isDeepEqual === void 0)
|
|
1750
|
-
lazyLoadComparison();
|
|
1720
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
1751
1721
|
if (!isDeepEqual(actual, expected)) {
|
|
1752
1722
|
innerFail({
|
|
1753
1723
|
actual,
|
|
@@ -1762,8 +1732,7 @@ var require_assert = __commonJS({
|
|
|
1762
1732
|
if (arguments.length < 2) {
|
|
1763
1733
|
throw new ERR_MISSING_ARGS("actual", "expected");
|
|
1764
1734
|
}
|
|
1765
|
-
if (isDeepEqual === void 0)
|
|
1766
|
-
lazyLoadComparison();
|
|
1735
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
1767
1736
|
if (isDeepEqual(actual, expected)) {
|
|
1768
1737
|
innerFail({
|
|
1769
1738
|
actual,
|
|
@@ -1778,8 +1747,7 @@ var require_assert = __commonJS({
|
|
|
1778
1747
|
if (arguments.length < 2) {
|
|
1779
1748
|
throw new ERR_MISSING_ARGS("actual", "expected");
|
|
1780
1749
|
}
|
|
1781
|
-
if (isDeepEqual === void 0)
|
|
1782
|
-
lazyLoadComparison();
|
|
1750
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
1783
1751
|
if (!isDeepStrictEqual(actual, expected)) {
|
|
1784
1752
|
innerFail({
|
|
1785
1753
|
actual,
|
|
@@ -1795,8 +1763,7 @@ var require_assert = __commonJS({
|
|
|
1795
1763
|
if (arguments.length < 2) {
|
|
1796
1764
|
throw new ERR_MISSING_ARGS("actual", "expected");
|
|
1797
1765
|
}
|
|
1798
|
-
if (isDeepEqual === void 0)
|
|
1799
|
-
lazyLoadComparison();
|
|
1766
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
1800
1767
|
if (isDeepStrictEqual(actual, expected)) {
|
|
1801
1768
|
innerFail({
|
|
1802
1769
|
actual,
|
|
@@ -1875,8 +1842,7 @@ var require_assert = __commonJS({
|
|
|
1875
1842
|
}
|
|
1876
1843
|
function expectedException(actual, expected, msg, fn) {
|
|
1877
1844
|
if (typeof expected !== "function") {
|
|
1878
|
-
if (isRegExp(expected))
|
|
1879
|
-
return expected.test(actual);
|
|
1845
|
+
if (isRegExp(expected)) return expected.test(actual);
|
|
1880
1846
|
if (arguments.length === 2) {
|
|
1881
1847
|
throw new ERR_INVALID_ARG_TYPE("expected", ["Function", "RegExp"], expected);
|
|
1882
1848
|
}
|
|
@@ -1897,8 +1863,7 @@ var require_assert = __commonJS({
|
|
|
1897
1863
|
} else if (keys.length === 0) {
|
|
1898
1864
|
throw new ERR_INVALID_ARG_VALUE("error", expected, "may not be an empty object");
|
|
1899
1865
|
}
|
|
1900
|
-
if (isDeepEqual === void 0)
|
|
1901
|
-
lazyLoadComparison();
|
|
1866
|
+
if (isDeepEqual === void 0) lazyLoadComparison();
|
|
1902
1867
|
keys.forEach(function(key) {
|
|
1903
1868
|
if (typeof actual[key] === "string" && isRegExp(expected[key]) && expected[key].test(actual[key])) {
|
|
1904
1869
|
return;
|
|
@@ -1988,8 +1953,7 @@ var require_assert = __commonJS({
|
|
|
1988
1953
|
}
|
|
1989
1954
|
}
|
|
1990
1955
|
function expectsNoError(stackStartFn, actual, error, message) {
|
|
1991
|
-
if (actual === NO_EXCEPTION_SENTINEL)
|
|
1992
|
-
return;
|
|
1956
|
+
if (actual === NO_EXCEPTION_SENTINEL) return;
|
|
1993
1957
|
if (typeof error === "string") {
|
|
1994
1958
|
message = error;
|
|
1995
1959
|
error = void 0;
|