We're a place where coders share, stay up-to-date and grow their careers.
This is also a very nice solution. I’ll add it to the tips! Thank you. I know that for some people, regex can be a eyesore. But there is beauty in its power.
Not much difference but I like to use sets for these comparisons for faster lookups.
const localDomains = new Set([...]) localDomains.has(...)
I actually also like this as a solution. Thank you!
This is also a very nice solution. I’ll add it to the tips! Thank you. I know that for some people, regex can be a eyesore. But there is beauty in its power.
Not much difference but I like to use sets for these comparisons for faster lookups.
I actually also like this as a solution. Thank you!