Slices
The Slices registry provides utilities for working with slice data structures, including functions for filtering, sorting, and transforming slices in a flexible manner.
list
{{ 1, 2, 3 | list }} // Output: [1, 2, 3]append / mustAppend
{{ append ["a", "b"], "c" }} // Output: ["a", "b", "c"]{{ mustAppend ["a", "b"], "c" }} // Output: ["a", "b", "c"], nil
{{ mustAppend nil, "c" }} // Output: nil, errorprepend / mustPrepend
{{ prepend ["b", "c"], "a" }} // Output: ["a", "b", "c"]{{ mustPrepend ["b", "c"], "a" }} // Output: ["a", "b", "c"], nilconcat
chunk / mustChunk
uniq / mustUniq
compact / mustCompact
slice / mustSlice
has / mustHas
without / mustWithout
rest / mustRest
initial / mustInitial
first / mustFirst
last / mustLast
reverse / mustReverse
sortAlpha
splitList
strSlice
until
untilStep
Last updated