Skip to content
Myr

recurse (i.e., ..) needs to find leaf nulls

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Nicolas Williams · committed by Nicolas Williams · parent 7bdf3a3 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/builtin.jq+1 added-1 removed
12 unmodified lines
13def _modify(paths; update): reduce path(paths) as $p (.; setpath($p; getpath($p) | update));14def map_values(f): .[] |= f;1516# recurse17def recurse(f): def r: ., (f | select(. != null) | r); r;17def recurse(f): def r: ., (f | r); r;18def recurse(f; cond): def r: ., (f | select(cond) | r); r;19def recurse: recurse(.[]?);20def recurse_down: recurse;21
285 unmodified lines