Skip to content

Commit

Permalink
fix: Removed the unused doUnesc param in the unsafe function (#243)
Browse files Browse the repository at this point in the history
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 => {`
  • Loading branch information
LoicE5 authored Mar 4, 2024
1 parent 29caa7c commit e237377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ini.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e237377

Please sign in to comment.