string => string type. Useful for
boolean => boolean type. Useful for
string => number type. Checks that the input is indeed a number or fails with a descriptive error message.
Takes a type and makes it nullable by providing a default value of
Takes a type and turns it into an array of type, useful for
Tries to decode the types provided until it succeeds, or throws all the errors combined. There's an optional configuration to this function:
combineErrors: function that takes a list of strings (the error messages) and returns a string which is the combined error message. The default value for it is to join with a newline:
xs => xs.join("\n").
oneOf(["string1", "string2", ...])
Takes a closed set of string values to decode from. An exact enum.