(array validator & [opts])
Validates if a value is a JavaScript array and validates each element.
Arguments:
Options:
Returns a validator function that accepts a context and returns a result with an array of validated elements if successful.
Validates if a value is a JavaScript array and validates each element. Arguments: - validator - A validator function to apply to each element Options: - :message - Custom error message function or string Returns a validator function that accepts a context and returns a result with an array of validated elements if successful.
(array-tuple validators-seq & [opts])
Validates if a value is a JavaScript array with specific validators for each position.
Arguments:
Options:
Returns a validator function that accepts a context and returns a result with an array of validated elements if successful. The input array must have the same length as the validators sequence.
Validates if a value is a JavaScript array with specific validators for each position. Arguments: - validators-seq - A sequence of validator functions, one for each position Options: - :message - Custom error message function or string Returns a validator function that accepts a context and returns a result with an array of validated elements if successful. The input array must have the same length as the validators sequence.
(iterable->vector)
(iterable->vector opts)
Converts a JavaScript iterable object to an array.
Options:
Returns a validator function that accepts a context and returns a result with a JavaScript array created from the iterable if successful.
Converts a JavaScript iterable object to an array. Options: - :message - Custom error message function or string Returns a validator function that accepts a context and returns a result with a JavaScript array created from the iterable if successful.
(object validator & [opts])
Validates if a value is a JavaScript object with same value type of unknown size.
Arguments:
Options:
Returns a validator function that accepts a context and returns a result with a map of validated property-value pairs if successful.
Validates if a value is a JavaScript object with same value type of unknown size. Arguments: - validator - A validator function Options: - :message - Custom error message function or string Returns a validator function that accepts a context and returns a result with a map of validated property-value pairs if successful.
(record validators-map & [opts])
Validates if a value is a JavaScript object and validates specific properties.
Arguments:
Options:
Returns a validator function that accepts a context and returns a result with a map of validated property-value pairs if successful.
Validates if a value is a JavaScript object and validates specific properties. Arguments: - validators-map - A map of property names to validator functions Options: - :message - Custom error message function or string Returns a validator function that accepts a context and returns a result with a map of validated property-value pairs if successful.
(replace-path ctx idx path)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close