diff --git a/index.js b/index.js index 6d2fcc9..ebe9ba1 100755 --- a/index.js +++ b/index.js @@ -98,7 +98,7 @@ function filter (obj, { protoAction = 'error', constructorAction = 'error', safe } function parse (text, reviver, options) { - const stackTraceLimit = Error.stackTraceLimit + const { stackTraceLimit } = Error Error.stackTraceLimit = 0 try { return _parse(text, reviver, options) @@ -108,7 +108,7 @@ function parse (text, reviver, options) { } function safeParse (text, reviver) { - const stackTraceLimit = Error.stackTraceLimit + const { stackTraceLimit } = Error Error.stackTraceLimit = 0 try { return _parse(text, reviver, { safe: true }) diff --git a/test/index.test.js b/test/index.test.js index 564f764..3f1c674 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,6 +1,6 @@ 'use strict' -const test = require('tape').test +const { test } = require('tape') const j = require('..') test('parse', t => {