refactor: replace deprecated String.prototype.substr() (#975)

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
CommanderRoot
2022-05-03 17:51:58 +02:00
committed by GitHub
parent ec1fcf66c6
commit af7e1cb1be
+1 -1
View File
@@ -26,7 +26,7 @@ function falseOnEnoent(e: any) {
}
function padRight(str: string, l: number) {
return (str + ' '.repeat(l)).substr(0, l)
return (str + ' '.repeat(l)).slice(0, l)
}
const bound: MethodDecorator = function bound<T>(