Skip to content

refactor: move getCharset helper to only usage#707

Open
Phillip9587 wants to merge 1 commit intoexpressjs:masterfrom
Phillip9587:move-get-charset
Open

refactor: move getCharset helper to only usage#707
Phillip9587 wants to merge 1 commit intoexpressjs:masterfrom
Phillip9587:move-get-charset

Conversation

@Phillip9587
Copy link
Member

@Phillip9587 Phillip9587 commented Feb 23, 2026

...and uses optional chaining. In theory it short-circuits faster and by that avoids the empty string allocation and .toLowerCase() call. But this is only in theory and probably highly optimized in engines.

Same ideas as @Ayoub-Mabrouk in #557.

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