diff options
author | J Phani Mahesh <github@phanimahesh.me> | 2017-02-07 14:14:29 +0530 |
---|---|---|
committer | Nico Williams <nico@cryptonector.com> | 2017-02-07 21:30:55 -0600 |
commit | dc679081fa770c260ca9a569a8a4fdbb10bcdc20 (patch) | |
tree | dc2b0b90e4ab58057d3f8849afd410ce453abea0 | |
parent | 597c1f6667746058e88a9f6fb0415f80fe114b18 (diff) |
fix truncate_stream to match docs
-rw-r--r-- | src/builtin.jq | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/builtin.jq b/src/builtin.jq index f7c6e9b7..f01280a7 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]; |