mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 11:06:02 +00:00
mognoDB bigint support
This commit is contained in:
@@ -590,11 +590,14 @@ export function jsonLinesParse(jsonLines: string): any[] {
|
||||
.filter(x => x);
|
||||
}
|
||||
|
||||
export function serializeJsTypesForJsonStringify(obj) {
|
||||
export function serializeJsTypesForJsonStringify(obj, replacer = null) {
|
||||
return _cloneDeepWith(obj, value => {
|
||||
if (typeof value === 'bigint') {
|
||||
return { $bigint: value.toString() };
|
||||
}
|
||||
if (replacer) {
|
||||
return replacer(value);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user