@andrew_l/toolkit 0.2.16 → 0.2.17
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/README.md +4 -4
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Toolkit
|
|
1
|
+
# Toolkit
|
|
2
2
|
|
|
3
|
-

|
|
4
|
-

|
|
5
|
-

|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
6
|
|
|
7
7
|
A personal collection of utility JavaScript functions that have been developed and refined over the years. This toolkit contains a variety of helper functions aimed at making everyday JavaScript tasks easier, more efficient, and maintainable.
|
|
8
8
|
|
package/dist/index.cjs
CHANGED
|
@@ -435,7 +435,7 @@ function createCustomizerFactory(fn) {
|
|
|
435
435
|
def(fn, WITH_CUSTOMIZER_FACTORY_SYM, true);
|
|
436
436
|
return fn;
|
|
437
437
|
}
|
|
438
|
-
function createSecureCustomizer(properties) {
|
|
438
|
+
function createSecureCustomizer(properties, opts) {
|
|
439
439
|
const secureLabel = `<** secure **>`;
|
|
440
440
|
const circularLabel = `<** circular **>`;
|
|
441
441
|
const propertiesSet = Object.freeze(
|
|
@@ -451,11 +451,12 @@ function createSecureCustomizer(properties) {
|
|
|
451
451
|
return circularLabel;
|
|
452
452
|
}
|
|
453
453
|
seenSet.add(value);
|
|
454
|
-
if (isError(value)) {
|
|
454
|
+
if (isError(value) && opts?.normalizeError !== false) {
|
|
455
455
|
return {
|
|
456
456
|
message: value.message,
|
|
457
457
|
stack: value.stack,
|
|
458
|
-
name: value.name
|
|
458
|
+
name: value.name,
|
|
459
|
+
cause: value.cause !== void 0 ? withCustomizer(seenSet, value.cause) : void 0
|
|
459
460
|
};
|
|
460
461
|
}
|
|
461
462
|
};
|