Utility functions for use with behaviours
Utility functions for use with behaviours
A list of all the comparators supported pipe seperated
A list of all the comparators supported pipe seperated
(apply-comparator lhs comparator rhs)
Compares two values using a specified comparator.
ARGUMENTS:
RETURNS: The result of the comparison as a boolean.
THROWS:
Compares two values using a specified comparator. ARGUMENTS: - lhs: The left-hand side value. - comparator: The comparator to use for comparison. Supports various string representations of comparison operators. - rhs: The right-hand side value. RETURNS: The result of the comparison as a boolean. THROWS: - ExceptionInfo if an unknown comparator is provided.
(distinct-by key-fn coll)
Returns a sequence of distinct elements based on a key function.
ARGUMENTS:
RETURNS: A sequence of distinct elements based on the produced keys.
Returns a sequence of distinct elements based on a key function. ARGUMENTS: - key-fn: A function that produces a key for each element. - coll: The collection of elements. RETURNS: A sequence of distinct elements based on the produced keys.
(get-field-value context field-name)
Retrieves the value of a specified field from the context.
ARGUMENTS:
RETURNS: The value of the specified field.
Retrieves the value of a specified field from the context. ARGUMENTS: - context: The context map containing various fields. - field-name: The name of the field whose value is to be retrieved. RETURNS: The value of the specified field.
(get-last-result context)
Retrieves the last result value from the context.
ARGUMENTS:
RETURNS: The last result value.
Retrieves the last result value from the context. ARGUMENTS: - context: The context map. RETURNS: The last result value.
(kebab-case s)
Converts a string to kebab-case.
ARGUMENTS:
RETURNS: The input string in kebab-case format.
Converts a string to kebab-case. ARGUMENTS: - s: The input string. RETURNS: The input string in kebab-case format.
(set-field-value context field-name val)
Sets the value of a specified field in the context.
ARGUMENTS:
RETURNS: The updated context with the specified field set to the given value.
Sets the value of a specified field in the context. ARGUMENTS: - context: The context map. - field-name: The name of the field to be set. - val: The value to set for the specified field. RETURNS: The updated context with the specified field set to the given value.
(set-last-result context val)
Sets the last result value in the context.
ARGUMENTS:
RETURNS: The updated context with the last result set to the given value.
Sets the last result value in the context. ARGUMENTS: - context: The context map. - val: The value to set as the last result. RETURNS: The updated context with the last result set to the given value.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close