mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-22 05:38:03 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { isBigInt } from './is/bigInt.js';
|
||||
/** @internal */
|
||||
function replacer(_, v) {
|
||||
return isBigInt(v)
|
||||
? v.toString()
|
||||
: v;
|
||||
}
|
||||
/**
|
||||
* @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, space) {
|
||||
return JSON.stringify(value, replacer, space);
|
||||
}
|
||||
Reference in New Issue
Block a user