@meltingspot/core 1.20.0 → 1.21.0
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/CHANGELOG.md +13 -0
- package/index.mjs +984 -923
- package/index.umd.js +4 -4
- package/package.json +1 -1
- package/utils/date/types.d.ts +1 -1
- package/utils/formatLogContext.d.ts +12 -0
package/package.json
CHANGED
package/utils/date/types.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Make an `Error` passed as log context readable in text-only sinks.
|
|
3
|
+
*
|
|
4
|
+
* The browser devtools expand an `Error` (or an object holding one) on their
|
|
5
|
+
* own, but text sinks such as the Errors tab of `chrome://extensions` only
|
|
6
|
+
* call `String()` on each argument: an object prints `[object Object]`, and
|
|
7
|
+
* `JSON.stringify` prints `{}` because an Error's own fields are not
|
|
8
|
+
* enumerable. So an `Error`, directly or under the `{ data }` key the SDKs
|
|
9
|
+
* use, is turned into `<name>: <message>` (an HTTP error already carries its
|
|
10
|
+
* status and body in its message). Any other value is returned unchanged.
|
|
11
|
+
*/
|
|
12
|
+
export declare const formatLogContext: (context: unknown) => unknown;
|