Transform operators are value → value pure functions. They never
touch the outside world — no files, no network, no clipboard.
Most operators are list-aware : they adapt to the input kind.
If the input contains ITEM_SEP (\x1F), it’s treated as a list;
otherwise as a scalar. The operator documentation below notes the
behavior for each kind.
These accept scalar input only. List input is rejected.
Syntax Description
base64:encodeEncode value to base64
base64:decodeDecode base64 to string
Decode failure → empty string (not an error).
mods: 'base64:encode'
mods: 'base64:decode'
Syntax Description
splitSplit by newline (default)
split:<sep>Split by separator
Accepts scalar only; always produces a list. Supports escape mnemonics
in the separator (\n, \t, \s).
mods: 'split' # split by newline
mods: 'split:,\s' # split by comma-space
Syntax Description
joinJoin with newline (default)
join:<sep>Join with custom separator
Supports escape mnemonics.
mods: 'join' # newline-separated
mods: 'join:,\s' # comma-space separated
Syntax Description
item:<N>Return element at index N (0-based)
Negative N counts from the end (item:-1 = last). Out of range →
empty string. On scalar input: returns the whole string if N is 0,
else empty.
mods: 'item:0' # first element
mods: 'item:-1' # last element
Syntax Description
sizeList → item count; scalar → byte length
Always returns a numeric string.
mods: 'size'
Syntax Description
filter:<X>Remove items containing X (substring)
filter:eq:<X>Remove items exactly equal to X
filter:not:<X>Keep items containing X (inverted)
mods: 'split|filter:eq:-' # remove items equal to "-"
mods: 'split|filter:not:error' # keep items containing "error"
Syntax Description
grep:<re>Keep items matching regex
grep:<re>:notRemove items matching regex
On scalar input: returns the whole string on match, else empty string.
mods: 'split|grep:^(feat|fix)' # keep conventional commit lines
mods: 'split|grep:^\\s*$:not' # remove blank lines
Syntax Description
sortSort ascending (default)
sort:ascSort ascending
sort:descSort descending
On scalar: sorts characters.
mods: 'split|sort'
mods: 'split|sort:desc'
Syntax Description
uniqRemove duplicate items / characters
Preserves first occurrence order.
mods: 'split|uniq'
Syntax Description
reverseList → reverse item order; scalar → reverse chars
mods: 'split|reverse'
Syntax Description
take:<N>List → first N items; scalar → first N chars
mods: 'split|take:5'
Syntax Description
tail:<N>List → last N items; scalar → last N chars
mods: 'split|tail:3'
These apply independently to each list item (or the whole scalar).
Syntax Description
lowerTo lowercase
upperTo UPPERCASE
mods: 'split|lower'
mods: 'upper'
Syntax Description
replace:<from>:<to>Replace all occurrences
mods: 'replace:old:new'
Syntax Description
trimStrip whitespace from ends; remove empty list items
trim:<chars>Strip whitespace + chars; remove items equal to chars
mods: 'trim' # strip whitespace, drop blanks
mods: 'trim:#' # strip whitespace and '#', drop items equal to '#'
Syntax Description
stripRemove ```lang\\n...\\n```, ~~~, `, """ wrappers
Auto-detects the wrapper type. Returns the inner content, trimmed.
mods: 'strip'
Syntax Description
default:<X>If value is empty → X, else passthrough
Per-item: each empty list item is replaced with X.
mods: 'default:N/A'
Syntax Description
format:jsonConvert to JSON
format:json5Convert to JSON5
format:yamlConvert to YAML
format:tomlConvert to TOML
Auto-detects input format (tries JSON, JSON5, YAML, TOML in order).
List-aware: each item is parsed independently, then wrapped into an
array for JSON/JSON5 output, concatenated for YAML. TOML does not
support top-level arrays.
mods: 'format:json'
mods: 'scan|ast|format:json'
Operator arguments support \n, \t, \s escapes (e.g. join:,\s).
Full escape system — see Placeholders & Escapes .