Skip to content

Bars Specification 0.1.0 — Transform: first

Category: list · Since: 0.1.0

First element of a list, or first character of a string.

Returns the first element of a list, or the first character of a string. A list whose shape does not match this expectation, or an unsupported input kind, yields null (a soft failure).

Arguments

None.

Arity: 0–0

Worked examples

{{ xs | first }}

10
{{ s | first }}

h

Full fixture: transforms/transform-first.json