UNPKG

@opra/common

Version:
15 lines (14 loc) 385 B
"use strict"; /** monkey patch (hijack) * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#use_within_json */ if (!BigInt.prototype.toJSON) { BigInt.prototype.toJSON = function () { return this.toString(); }; } if (!RegExp.prototype.toJSON) { RegExp.prototype.toJSON = function () { return this.toString(); }; }