Skip to content
Myr

NEWS.md: tweaks

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

correct grammar, add attributions, clarify abs

authored by pkoppstein · committed by Nico Williams · parent 28af007 · Browse files · 1 file+3 added−3 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+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:NEWS.md+3 added-3 removed
95 unmodified lines
96 },97 "x": null98 }99 ```100- Adds new builtin `debug(msgs)` that works like `debug` but applies a filter on the input before writing to stderr.100- Adds new builtin `debug(msgs)` that works like `debug` but applies a filter on the input before writing to stderr. @pkoppstein #2710101 ```sh102 $ jq -n '1 as $x | 2 | debug("Entering function foo with $x == \($x)", .) | (.+1)'103 ["DEBUG:","Entering function foo with $x == 1"]104 ["DEBUG:",2]
12 unmodified lines
117 $ jq -n '"abAB" | scan("ab"; "i")'118 "ab"119 "AB"120 ```121- Adds new builtin `abs` to get absolute value. This was previously possibly using `length` or `fabs` but naming was a bit confusing. @pkoppstein #2767121- Adds new builtin `abs` to get absolute value. This potentially allows the literal value of numbers to be preserved as `length` and `fabs` convert to float. @pkoppstein #2767122- Allow `if` without `else`-branch. When skipped the `else`-branch will be `.` (identity). @chancez @wader #1825 #2481123 ```sh124 # convert 1 to "one" otherwise keep as is125 $ jq -n '1,2 | if . == 1 then "one" end'
40 unmodified lines
166 # now this works as expected, filter out all values over 2 by assigning empty167 $ jq -c '(.[] | select(. >= 2)) |= empty' <<< '[1,5,3,0,7]'168 [1,0]169 ```170- Fix `stderr/0` to output raw without any decoration. @itchyny #2751170- Fix `stderr/0` to output raw text without any decoration. @itchyny #2751171- Fix `nth/2` to emit empty on index out of range. @itchyny #2674172- Fix `implode` to not assert and instead replace invalid unicode codepoints. @wader #2646173- Simpler and faster `transpose`. @pkoppstein #2758174- Allow keywords to be used as binding name in more places. @emanuele6 #2681
119 unmodified lines