Skip to content

Commit

Permalink
fix: ignore strings starting with 0 (#894)
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 committed Jul 17, 2024
1 parent 4e8b444 commit f11b9de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const isJsonString = (str: string) => {
};

const isBigInt = (str: string) => {
if (str.trim().length === 0) return false;
if (str.trim().length === 0 || str.startsWith("0")) return false;
try {
BigInt(str);
return true;
Expand Down

0 comments on commit f11b9de

Please sign in to comment.