fix truncate_stream to match docs

This commit is contained in:
J Phani Mahesh authored and Nico Williams committed 2017-02-07 21:30:55 -06:00
1 parent 597c1f6667
commit dc679081fa
1 file changed
+1 -1
+1 -1
View File
@@ -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];