Feature: return the value directly
gideaoms opened this issue · 2 comments
gideaoms commented
Hi, congratulations for the lib.
I would like to know if there is a possibility to return the value directly when I don't need to use it.
How it works today:
match(5)
.when(1, () => "one")
.when(2, () => "two")
.otherwise(() => "three or greater")
How I would like it to work:
match(5)
.when(1, "one")
.when(2, "two")
.otherwise("three or greater")
darrylnoakes commented
Duplicate of #100.