diff --git a/lib/ini.js b/lib/ini.js index b0be0b3..965e702 100644 --- a/lib/ini.js +++ b/lib/ini.js @@ -182,9 +182,8 @@ const unsafe = (val, doUnesc) => { if (isQuoted(val)) { // remove the single quotes before calling JSON.parse if (val.charAt(0) === "'") { - val = val.substr(1, val.length - 2) + val = val.slice(1, -1) } - try { val = JSON.parse(val) } catch (_) {}