Added replacer in stringfy method to optionally use toString method for big ints. (#4745)
This commit is contained in:
parent
cbca6bedd4
commit
a133a320cf
|
|
@ -194,7 +194,11 @@ export const removeFunctions = (value: any) => {
|
|||
if (_.isFunction(value)) {
|
||||
return "Function call";
|
||||
} else if (_.isObject(value)) {
|
||||
return JSON.parse(JSON.stringify(value));
|
||||
return JSON.parse(
|
||||
JSON.stringify(value, (_, v) =>
|
||||
typeof v === "bigint" ? v.toString() : v,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user