Skip to content

refactor : replace deprecated substr() with slice()#1099

Merged
bjohansebas merged 1 commit into
expressjs:masterfrom
Ayoub-Mabrouk:replace-substr-with-slice
Jul 6, 2026
Merged

refactor : replace deprecated substr() with slice()#1099
bjohansebas merged 1 commit into
expressjs:masterfrom
Ayoub-Mabrouk:replace-substr-with-slice

Conversation

@Ayoub-Mabrouk

Copy link
Copy Markdown
Contributor

Replace all instances of String.prototype.substr() with String.prototype.slice() to use the standard, non-deprecated method. This maintains compatibility with Node.js >= 0.8.0 while following modern JavaScript best practices.

All replacements maintain identical functionality as slice() and substr() behave the same for these use cases.

Replace all instances of String.prototype.substr() with String.prototype.slice()
to use the standard, non-deprecated method. This maintains compatibility with
Node.js >= 0.8.0 while following modern JavaScript best practices.

All replacements maintain identical functionality as slice() and substr() behave
the same for these use cases.
@bjohansebas
bjohansebas force-pushed the replace-substr-with-slice branch from 0a86639 to 36ecac2 Compare July 6, 2026 02:28
@bjohansebas
bjohansebas merged commit 2deb78e into expressjs:master Jul 6, 2026
33 checks passed
@bjohansebas bjohansebas mentioned this pull request Jul 6, 2026
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.

2 participants