fix truncate_stream to match docs
This commit is contained in:
1 parent
597c1f6667
commit
dc679081fa
1 file changed
+1
-1
+1
-1
@@ -210,7 +210,7 @@ def ascii_upcase:
|
||||
|
||||
# Streaming utilities
|
||||
def truncate_stream(stream):
|
||||
. as $n | null | stream | . as $input | if (.[0]|length) > $n then setpath([0];$input[0][1:]) else empty end;
|
||||
. as $n | null | stream | . as $input | if (.[0]|length) > $n then setpath([0];$input[0][$n:]) else empty end;
|
||||
def fromstream(i):
|
||||
foreach i as $item (
|
||||
[null,false,null,false];
|
||||
|
||||
Reference in new issue
Block a user