From af7e1cb1be1d47a1bb7caaa5966d3b622d62bc7c Mon Sep 17 00:00:00 2001 From: CommanderRoot Date: Tue, 3 May 2022 17:51:58 +0200 Subject: [PATCH] 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 --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index 5038ef6..83ff194 100644 --- a/src/util.ts +++ b/src/util.ts @@ -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(