Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(constants): Move the client name IDs into their own CLIENT_NAME_IDS object #875

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

absidue
Copy link
Collaborator

@absidue absidue commented Jan 16, 2025

Moving the client name IDs into their own object, allows us to simplify the lookups in HTTPClient to just being a property lookup, instead of using Object.values() and Array#find() to locate the correct client information. It is worth noting that unlike the CLIENTS object that uses user-friendly names as the keys, the new CLIENT_NAME_IDS object uses the real client names (the ones in the NAME fields in the CLIENTS object) to enable the quick lookup.

@LuanRT LuanRT merged commit 06887e9 into LuanRT:main Jan 17, 2025
4 checks passed
@absidue absidue deleted the client-name-object branch January 17, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants