Liking cljdoc? Tell your friends :D

dev.jaide.valhalla.js


arraycljs

(array validator & [opts])

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.

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.
raw docstring

array-tuplecljs

(array-tuple validators-seq & [opts])

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.

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.
raw docstring

iterable->vectorcljs

(iterable->vector)
(iterable->vector opts)

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.

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.
raw docstring

objectcljs

(object validator & [opts])

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.

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.
raw docstring

recordcljs

(record validators-map & [opts])

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.

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.
raw docstring

replace-pathcljs

(replace-path ctx idx path)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close