diff --git a/src/parse.ts b/src/parse.ts index 544a7f8..35570e5 100644 --- a/src/parse.ts +++ b/src/parse.ts @@ -8,6 +8,10 @@ const traverseObject = ( parentKey: string, separator: string ) => { + if(typeof value === 'number' && obj > Number.MAX_SAFE_INTEGER) { + throw new Error('Do not know how to serialize a BigInt') + } + const childKeys = Object.keys(obj); if (childKeys.length === 0) {