-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update axios version and add bigIntJSON support on console page * Fix View point page * fix: prop type warning * Update history and savedCode components to use bigIntJSON for localStorage * add bigInt support filtereditorwindow in visual vector * Add bigInt support in json parsing. Fix JSON. -> bigIntJSON. * fmt * Update JSON parsing in RequesFromCode.js * Update @qdrant/js-client-rest to version 1.8.1 * Fix parsing issue in RequesFromCode.js
- Loading branch information
1 parent
b753c05
commit de1284a
Showing
21 changed files
with
139 additions
and
81 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
let bigintReviver; | ||
let bigintReplacer; | ||
|
||
if ('rawJSON' in JSON) { | ||
bigintReviver = function (_key, val, context) { | ||
if (Number.isInteger(val) && !Number.isSafeInteger(val)) { | ||
try { | ||
return BigInt(context?.source); | ||
} catch { | ||
return val; | ||
} | ||
} | ||
return val; | ||
}; | ||
bigintReplacer = function (_key, val) { | ||
if (typeof val === 'bigint') { | ||
return JSON.rawJSON(String(val)); | ||
} | ||
return val; | ||
}; | ||
} | ||
|
||
export const bigIntJSON = { | ||
parse: function (text, reviver) { | ||
return JSON.parse(text, reviver || bigintReviver); | ||
}, | ||
stringify: function (value, replacer, space) { | ||
return JSON.stringify(value, replacer || bigintReplacer, space); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.