Length
Compares operand
to test
(an
Integer
) and returns a function that takes an optional
arg
and uses it as the operand or injects a argument from some other
source (e.g., HTML element, query string, session storage).
When called, the returned function returns the operand if it is
more/less/etc. than the test number, otherwise returns an
Error
.
TODO: Extend to cover arrays.
- IsLength
= (datatype = "String") => operand => test => => (arg => Either<Error, String)
- IsLongerThan
= (datatype = "String") => operand => test => => (arg => Either<Error, String)
- IsNoLongerThan
= (datatype = "String") => operand => test => => (arg => Either<Error, String)
- IsNoShorterThan
= (datatype = "String") => operand => test => => (arg => Either<Error, String)
- IsNotLength
= (datatype = "String") => operand => test => => (arg => Either<Error, String)
- IsShorterThan
= (datatype = "String") => operand => test => => (arg => Either<Error, String)