diff --git a/index.js b/index.js index d04a1a9..7a83736 100644 --- a/index.js +++ b/index.js @@ -21,6 +21,10 @@ function ensureProperties(obj) { var seen = [ ]; // store references to objects we have seen before function visit(obj) { + if (typeof obj === 'bigint') { + return obj.toString(); + } + if (obj === null || typeof obj !== 'object') { return obj; }