@opra/common
Version:
Opra common package
15 lines (14 loc) • 385 B
JavaScript
;
/** 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();
};
}