Skip to content

smartCoerce

smartCoerce(value) → value · Type

Smart coercion — infers the target type from context and coerces the value.

  • value (required): value to coerce
utlx
smartCoerce("42")                        // 42 (number)
smartCoerce("true")                      // true (boolean)
smartCoerce("2026-05-01")                // date value

Released under AGPL-3.0.