Skip to content

Commit

Permalink
fix(json): invalid default stringify replacer
Browse files Browse the repository at this point in the history
  • Loading branch information
khangdt22 committed Dec 29, 2023
1 parent 163d898 commit 4ad8b23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function parse(data: string, reviver: ParseReviver | ParseReviver[] = big
}

export function stringify(data: any, options: StringifyOptions = {}) {
const { replacer = bigIntDeserialize, ...rest } = options
const { replacer = bigIntSerialize, ...rest } = options
const replacers = Array.isArray(replacer) ? replacer : [replacer]

const rpl = (key: string, value: any) => {
Expand Down

0 comments on commit 4ad8b23

Please sign in to comment.