Current implementation support only arguments in the following formats:
STREAMS, stream1, stream2, ... , id1, id2
BLOCK <<val>>, stream1, stream2, ... , id1, id2.
According Redis docs both BLOCKS and COUNT can present and in different order. For example, socket.io-redis-streams-adapter library calls XREAD with "BLOCK", 100, "COUNT", readCount, "STREAMS", streamName, offset.
The source code here.
I replaced this line with rest: args[1] === 'COUNT' ? args.slice(4) : args.slice(2), and this fixes this specific case.
I can submit a PR to fix parsing parameters.