Skip to content

url: replaced slice with at#59181

Merged
nodejs-github-bot merged 4 commits intonodejs:mainfrom
Connormiha:optimize-liburl-strings
Sep 14, 2025
Merged

url: replaced slice with at#59181
nodejs-github-bot merged 4 commits intonodejs:mainfrom
Connormiha:optimize-liburl-strings

Conversation

@Connormiha
Copy link
Contributor

I replaced slice(-1) with at(-1) to avoid creating a new collection, since at() directly accesses the element without copying the array.
I did the same for a string in another place — replaced slice(-1) with at(-1) for consistency and simplicity.

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

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. url Issues and PRs related to the legacy built-in url module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants