Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: replace deprecatedString.prototype.substr()#646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
darrachequesne merged 1 commit intosocketio:mainfromlamweili:rm-deprecated-substr
Jun 6, 2022
Merged

refactor: replace deprecatedString.prototype.substr()#646

darrachequesne merged 1 commit intosocketio:mainfromlamweili:rm-deprecated-substr
Jun 6, 2022

Conversation

lamweili
Copy link
Contributor

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

DeprecatedString.prototype.substr() is used.

New behaviour

String.prototype.slice() is used instead.

Other information (e.g. related issues)

Apart from changing allString.prototype.substr() toString.prototype.slice(), also changedString.prototype.substring() toString.prototype.slice() for consistency so there are no two different functions that are doing the essentially the same thing.

In addition, removed// eslint-disable-line node/no-deprecated-api as it is redundant following PR#565.

`.substr()` is deprecated so we replace it with `.slice()` which works similarily but isn't deprecatedSigned-off-by: Lam Wei Li <peteriman@mail.com>
@darrachequesnedarrachequesne merged commit917d1d2 intosocketio:mainJun 6, 2022
@darrachequesne
Copy link
Member

@peteriman thanks 👍

lamweili reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@lamweili@darrachequesne

[8]ページ先頭

©2009-2025 Movatter.jp