Skip to main content

coerce

function

babashka.cli/coerce

(coerce [s f])
Coerce string `s` using `f`. Does not coerce when `s` is not a string. `f` may be a keyword (`:boolean`, `:int`, `:double`, `:symbol`, `:keyword`) or a function. When `f` return `nil`, this is interpreted as a parse failure and throws.

No examples yet. Be the first to add one!

Categories