From dc679081fa770c260ca9a569a8a4fdbb10bcdc20 Mon Sep 17 00:00:00 2001 From: J Phani Mahesh Date: Tue, 7 Feb 2017 14:14:29 +0530 Subject: [PATCH] fix truncate_stream to match docs --- src/builtin.jq | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/builtin.jq b/src/builtin.jq index f7c6e9b..f01280a 100644 --- a/src/builtin.jq +++ b/src/builtin.jq @@ -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]; -- 2.50.0