From d8c9df1fdbeb4ba7a84a1bdd5b34e11a466b6a83 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Mon, 10 Jan 2022 11:09:26 -0800 Subject: [PATCH] chore: remove eval to allow execution without unsafe-eval CSP --- lib/toml-parser.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/toml-parser.js b/lib/toml-parser.js index 50eee1c..d69a84b 100644 --- a/lib/toml-parser.js +++ b/lib/toml-parser.js @@ -172,16 +172,7 @@ function isList (obj) { return obj[_type] === LIST } -// in an eval, to let bundlers not slurp in a util proxy -let _custom -try { - const utilInspect = eval("require('util').inspect") - _custom = utilInspect.custom -} catch (_) { - /* eval require not available in transpiled bundle */ -} -/* istanbul ignore next */ -const _inspect = _custom || 'inspect' +const _inspect = 'inspect' class BoxedBigInt { constructor (value) {