Skip to content

Commit

Permalink
refactor: use object destructuring (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Oct 23, 2023
1 parent 993b36d commit 0d7fdfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 })
Expand Down
2 changes: 1 addition & 1 deletion test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const test = require('tape').test
const { test } = require('tape')
const j = require('..')

test('parse', t => {
Expand Down

0 comments on commit 0d7fdfb

Please sign in to comment.