derhuerst/email-providers

index.js: transform array into Set for quick lookup

Open

#11 opened on Sep 10, 2021

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (2 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (53 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I've made this exact request in another package, but this is a request to ship a js Map or js Object along with/instead of the array version.

The lookup on the Map/Object is O(1) while array is O(n). When checking upon signups and signins, this makes a difference when there are many requests per second.

Thanks.

Contributor guide