stoeffel/elm-verify/4.0.0

NOTE: this package is not compatible with Elm 0.19.1

Dict.Verify

Functions to verify properties of a Dict.

notEmpty : error -> Validator error (Dict a b) (Dict a b)

Fails if a Dict is empty.

import Dict


notEmpty "error" <| Dict.empty
--> Err [ "error" ]


notEmpty "error" <| Dict.fromList [ (1, 1) ]
--> Ok <| Dict.fromList [ (1, 1) ]