Small consistency cleanups (#1178)

* Small consistency cleanups

* Adjust

* Adjust
This commit is contained in:
Jaco
2021-11-13 17:39:52 +02:00
committed by GitHub
parent 9043f335d4
commit 5fdd967666
14 changed files with 48 additions and 31 deletions
+7 -2
View File
@@ -10,6 +10,11 @@ function replacer (_: unknown, v: unknown): unknown {
: v;
}
export function stringify (args: unknown, space?: string | number): string {
return JSON.stringify(args, replacer, space);
/**
* @name stringify
* @summary Performs a JSON.stringify, with BigInt handling
* @description A wrapper for JSON.stringify that handles BigInt values transparently, converting them to string. No differences from the native JSON.stringify function otherwise.
*/
export function stringify (value: unknown, space?: string | number): string {
return JSON.stringify(value, replacer, space);
}