Skip to main content

When to use these helpers

Prefer a small explicit condition over a long nested expression. Evaluate null and empty values deliberately before using a result to change a status, routing decision, or public output.

Calling style

Call a helper as between($.requested_amount, 1000, 10000). Not every helper is available everywhere: validation, form, and document-template helpers have distinct context contracts. Editor suggestions are not proof that a helper is supported at runtime.

Complete function reference

andFn

Combines two truthy checks. Signature: andFn(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | andFn(...).

between

Checks whether a numeric or comparable value is inside an inclusive range. This is the active between helper; the earlier text-extraction registration is overwritten. Signature: between(value, minimum, maximum) Example:
Availability: General helper in shared builder and document-template runtimes; function and transform forms are available. Note: It can also be written as a transform when the first value is the input: value | between(...).

coalesce

Returns the first non-null value. Signature: coalesce(first, fallback) Example:
Note: It can also be written as a transform when the first value is the input: value | coalesce(...).

defaultTo

Returns the first argument that is not null or undefined; an empty string is retained. Signature: defaultTo(...values) Example:
Note: It can also be written as a transform when the first value is the input: value | defaultTo(...).

eq

Compares two values with loose equality. Signature: eq(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | eq(...).

equalsAll

Checks whether every variadic candidate equals a value. Signature: equalsAll(value, ...candidates) Example:
Note: It can also be written as a transform when the first value is the input: value | equalsAll(...).

equalsAny

Checks a value against any variadic candidate. Signature: equalsAny(value, ...candidates) Example:
Note: It can also be written as a transform when the first value is the input: value | equalsAny(...).

gt

Checks whether the first value is greater than the second. Signature: gt(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | gt(...).

gte

Checks whether the first value is greater than or equal to the second. Signature: gte(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | gte(...).

hasProperty

Checks whether an object has a property. Signature: hasProperty(value, property) Example:
Note: It can also be written as a transform when the first value is the input: value | hasProperty(...).

ifElse

Returns one of two values based on a condition. Signature: ifElse(condition, whenTrue, whenFalse) Example:
Note: It can also be written as a transform when the first value is the input: value | ifElse(...).

inOp

Checks whether a value exists in a string or list. Signature: inOp(value, collection) Example:
Note: It can also be written as a transform when the first value is the input: value | inOp(...).

inRange

Checks a value against one or more inclusive [minimum, maximum] ranges. Signature: inRange(value, ...ranges) Example:
Note: It can also be written as a transform when the first value is the input: value | inRange(...).

instanceOf

Checks a value against a constructor supplied by the evaluation context. Signature: instanceOf(value, constructor) Example:
Note: It can also be written as a transform when the first value is the input: value | instanceOf(...).

isNotNull

Checks whether a value is present. Signature: isNotNull(value) Example:
Note: It can also be written as a transform when the first value is the input: value | isNotNull(...).

isNull

Checks whether a value is null or undefined. Signature: isNull(value) Example:
Note: It can also be written as a transform when the first value is the input: value | isNull(...).

isType

Checks a value against a named JavaScript type. Signature: isType(value, type) Example:
Note: It can also be written as a transform when the first value is the input: value | isType(...).

like

Matches text with a percent-wildcard pattern, case-insensitively. Signature: like(value, pattern) Example:
Note: It can also be written as a transform when the first value is the input: value | like(...).

lt

Checks whether the first value is less than the second. Signature: lt(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | lt(...).

lte

Checks whether the first value is less than or equal to the second. Signature: lte(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | lte(...).

ne

Checks loose inequality. Signature: ne(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | ne(...).

not

Negates a truthy or falsy value. Signature: not(value) Example:
Note: It can also be written as a transform when the first value is the input: value | not(...).

notEqualsAny

Checks whether a value differs from every variadic candidate. Signature: notEqualsAny(value, ...candidates) Example:
Note: It can also be written as a transform when the first value is the input: value | notEqualsAny(...).

notIn

Checks whether a value does not exist in a string or list. Signature: notIn(value, collection) Example:
Note: It can also be written as a transform when the first value is the input: value | notIn(...).

notLike

Checks that text does not match a case-insensitive percent-wildcard pattern. Signature: notLike(value, pattern) Example:
Note: It can also be written as a transform when the first value is the input: value | notLike(...).

orFn

Combines two truthy checks. Signature: orFn(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | orFn(...).

regex

Matches text with a regular-expression pattern. Signature: regex(value, pattern, flags) Example:
Note: It can also be written as a transform when the first value is the input: value | regex(...).

safeGet

Reads a nested property without throwing for a missing value. Signature: safeGet(value, path) Example:
Note: It can also be written as a transform when the first value is the input: value | safeGet(...).

strictEq

Compares two values without type coercion. Signature: strictEq(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | strictEq(...).

strictNe

Checks strict inequality without type coercion. Signature: strictNe(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | strictNe(...).

xorFn

Returns true when exactly one input is truthy. Signature: xorFn(left, right) Example:
Note: It can also be written as a transform when the first value is the input: value | xorFn(...).

Before you publish

  • Start with a known value and confirm the expected result.
  • Handle null, empty text, and empty lists deliberately.
  • Do not place secrets, access tokens, or sensitive personal data in an expression.
  • Read expression contexts and availability before copying an expression between features.
Comparison and conditional helpers in KayanOS