refactor: use cached slice in app.listen by Tacit1 · Pull Request #6897 · expressjs/express

Skip to content

Navigation Menu

Sign in

Appearance settings

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

Comments

Conversation

@Tacit1

Copy link

Contributor

@Tacit1 Tacit1 commented

Nov 16, 2025

Use the existing slice variable instead of Array.prototype.slice for consistency and to avoid repeated property lookups.

No behavior change. All tests pass. Linting clean.

Closes #6896

Signed-off-by: Tacit1 <tacitim5@gmail.com>
Copy link

Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bjohansebas bjohansebas merged commit 54af593 into expressjs:master

Nov 23, 2025

28 checks passed

@UlisesGascon UlisesGascon mentioned this pull request

Nov 25, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@bjohansebas bjohansebas bjohansebas approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Minor Cleanup: Use Cached slice Reference in app.listen Implementation

2 participants

@Tacit1 @bjohansebas