From e237377029caa6fe76b1290eb6e64247e3e11cf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <59501884+LoicE5@users.noreply.github.com> Date: Mon, 4 Mar 2024 17:41:17 +0000 Subject: [PATCH] fix: Removed the unused doUnesc param in the unsafe function (#243) The function `unsafe` have a parameter that is not used anywhere : `doUnesc`. In this PR, this parameter is removed, also making the function declaration syntaxically closer to `safe`. Before : `const unsafe = (val, doUnesc) => {` Now : `const unsafe = val => {` --- lib/ini.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ini.js b/lib/ini.js index 724d69d..0e8623e 100644 --- a/lib/ini.js +++ b/lib/ini.js @@ -225,7 +225,7 @@ const safe = val => { return val.split(';').join('\\;').split('#').join('\\#') } -const unsafe = (val, doUnesc) => { +const unsafe = val => { val = (val || '').trim() if (isQuoted(val)) { // remove the single quotes before calling JSON.parse