Retweeted

Discovered this very interesting usage of `switch` in a codebase, basically making it possible to match cases on arbitrary logic instead of an exact match of string or number literals.
github.com/eggheadio/gatsby-them…
is this a commonly known pattern? First time I’ve ever seen this. t.co/4yywO4fIDG