Skip to content

Replace deprecated String.prototype.substr()#7

Open
CommanderRoot wants to merge 1 commit into
FrankerFaceZ:mainfrom
CommanderRoot:rm-deprecated-substr
Open

Replace deprecated String.prototype.substr()#7
CommanderRoot wants to merge 1 commit into
FrankerFaceZ:mainfrom
CommanderRoot:rm-deprecated-substr

Conversation

@CommanderRoot

Copy link
Copy Markdown

String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.
.substr() probably isn't going away anytime soon but as the change is trivial it doesn't hurt to switch.

String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with slice() which works similarily but isn't deprecated.
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant