Skip to main content

Module utility

Module utility 

Source
Expand description

Cross-runtime utility primitives used by grammar and option handling.

Structs§

ListMods

Functions§

deep
Recursively merge JSON data. Objects merge by key, arrays by index, and unlike container kinds or scalar values are replaced by the overlay.
modlist
Apply canonical delete-then-move list modifications.
str_inject
Substitute {a.b.0} paths from an object or array. Missing paths retain their placeholder, matching the TypeScript and Go utilities.
str_value
Render JSON-like data to at most max_len characters, marking truncation with dots using the canonical Tabnas behavior.

Type Aliases§

ListModifier
Final arbitrary list transform used by ListMods. The callback receives the already delete/move-adjusted list. Returning None retains that list, including any in-place changes; returning Some replaces it.