Liking cljdoc? Tell your friends :D

mermaid-processor.behaviors.utils

Utility functions for use with behaviours

Utility functions for use with behaviours
raw docstring

all-comparatorsclj

A list of all the comparators supported pipe seperated

A list of all the comparators supported pipe seperated
sourceraw docstring

apply-comparatorclj

(apply-comparator lhs comparator rhs)

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

distinct-byclj

(distinct-by key-fn coll)

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.

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

field-to-keywordclj

(field-to-keyword field-name)

Converts a given field name to a keyword.

ARGUMENTS:

  • field-name: The field name to be converted. Can be a string, keyword, or vector.

RETURNS: The field name as a keyword.

Converts a given field name to a keyword.

ARGUMENTS:
- field-name: The field name to be converted. Can be a string, keyword, or vector.

RETURNS:
The field name as a keyword.
sourceraw docstring

get-field-valueclj

(get-field-value context field-name)

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.

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

get-last-resultclj

(get-last-result context)

Retrieves the last result value from the context.

ARGUMENTS:

  • context: The context map.

RETURNS: The last result value.

Retrieves the last result value from the context.

ARGUMENTS:
- context: The context map.

RETURNS:
The last result value.
sourceraw docstring

kebab-caseclj

(kebab-case s)

Converts a string to kebab-case.

ARGUMENTS:

  • s: The input string.

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

set-field-valueclj

(set-field-value context field-name val)

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.

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

set-last-resultclj

(set-last-result context val)

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.

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

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

× close