Skip to content

Commit

Permalink
fix: replace deprecated String.prototype.substr() (#59)
Browse files Browse the repository at this point in the history
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
  • Loading branch information
CommanderRoot committed Apr 5, 2022
1 parent 61fd84f commit 383d7e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/to-batch-syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ function replaceDollarWithPercentPair (value) {
startIndex = dollarExpressions.lastIndex
}
} while (dollarExpressions.lastIndex > 0)
result += value.substr(startIndex)
result += value.slice(startIndex)
return result
}

0 comments on commit 383d7e9

Please sign in to comment.