readable.push('')
不建议使用 readable.push('')。
🌐 Use of readable.push('') is not recommended.
将一个零字节字符串、Buffer 或 Uint8Array 推送到非对象模式的流中会有一个有趣的副作用。因为这确实是对 readable.push() 的调用,这个调用将结束读取过程。然而,由于参数是一个空字符串,因此不会向可读缓冲区添加任何数据,所以用户没有任何内容可以读取。
🌐 Pushing a zero-byte string, Buffer, or Uint8Array to a stream that is not in
object mode has an interesting side effect. Because it is a call to
readable.push(), the call will end the reading process.
However, because the argument is an empty string, no data is added to the
readable buffer so there is nothing for a user to consume.