stoeffel/elm-verify/4.0.0

NOTE: this package is not compatible with Elm 0.19.1

Maybe.Verify

Functions to verify properties of a Maybe.

isJust : error -> Validator error (Maybe a) a

Fails if a Maybe is Nothing.

isJust "error" Nothing
--> Err [ "error" ]




isJust "error" (Just 42)
--> Ok 42 -- It removes the wrapper as well!