4 ms·
Nice, I will have to watch for cases where I could make use of that! I think I originally found the const-style on somewhere HN or SO but it has changed a bit
by joshstrange 2y ago
Nice, I will have to watch for cases where I could make use of that!
I think I originally found the const-style on somewhere HN or SO but it has changed a bit over the years due to suggestions people have made so thank you for contributing to improvement of this pattern for me.
- ralusek 2y agoI end up using the sets a lot in particular for any case where you're dealing with unvalidated data. Type checks where you need to say, for example, SMS_TYPE_SET.has(someValue)