builtin.jq: naive abs/0
manual.yml explains that the def is naive, and mentions fabs, etc.
This commit is contained in:
1 parent
3a1ba0c42d
commit
7b725378b9
5 files changed
+53
No files matched your search
@@ -10,6 +10,7 @@ def max_by(f): _max_by_impl(map([f]));
|
||||
def min_by(f): _min_by_impl(map([f]));
|
||||
def add: reduce .[] as $x (null; . + $x);
|
||||
def del(f): delpaths([path(f)]);
|
||||
def abs: if . < 0 then - . else . end;
|
||||
def _assign(paths; $value): reduce path(paths) as $p (.; setpath($p; $value));
|
||||
def _modify(paths; update):
|
||||
reduce path(paths) as $p ([., []];
|
||||
|
||||
Reference in new issue
Block a user