From 6ab626fc0dcb4ce62345c9ee967ba300474728e2 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 6 Feb 2021 09:20:07 +0100 Subject: :sparkles: convertBigIntToString --- dist/util/convertBigIntToString.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 dist/util/convertBigIntToString.js (limited to 'dist/util/convertBigIntToString.js') diff --git a/dist/util/convertBigIntToString.js b/dist/util/convertBigIntToString.js new file mode 100644 index 00000000..a72b5a57 --- /dev/null +++ b/dist/util/convertBigIntToString.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.convertBigIntToString = void 0; +require("missing-native-js-functions"); +function convertBigIntToString(obj) { + if (typeof obj === "bigint") + obj = obj.toString(); + if (typeof obj === "object") { + obj.keys().forEach((key) => { + obj[key] = convertBigIntToString(obj[key]); + }); + } + return obj; +} +exports.convertBigIntToString = convertBigIntToString; +//# sourceMappingURL=convertBigIntToString.js.map \ No newline at end of file -- cgit 1.5.1