arktypea
arktype•11mo ago
ciscoheat

Testing a type in pipe

Congratulations on the 2.0 release, it's working great! 😀 Is it possible/best practice to run a type inside pipe? I'm having this test condition:

If string is a valid url, return URL
Else return null


I'm not sure of the best way to handle this scenario with morphs? I see there's a second parameter for pipe.try, can it be used to simplify?
Was this page helpful?