Skip to content

Bars Specification 0.1.0 — Transform: compact

Category: list · Since: 0.1.0

Removes null elements from a list.

Returns a new list with every null element removed, preserving the relative order of the remaining elements. A non-list input is a soft failure yielding null.

Input coercion: list

Arguments

None.

Arity: 0–0

Worked examples

{{ xs | compact }}

[1,2,3]
{{ xs | compact }}

["a","b"]

Full fixture: transforms/transform-compact.json