Noticed this bit of code in `lib/stream.js` on the master branch: ```js const version = process.version.substr(1).split('.'); if (version[0] === 0 && version[1] < 12) { Stream._uint8ArrayToBuffer = Buffer; } else { ... ``` 1. Since the code internal in node can only ever be the version that it is, it seems odd to be checking the version in this way. 2. It looks like it's checking for node `0.x < 0.12`?? 3. Splitting a string returns an array of _strings_, so `version[0] === 0` would always return `false` even in node 0.11 and before. I think this can be removed? * **Version**: 12.12.0 * **Platform**: All * **Subsystem**: stream
Activity
lpinca commentedon Oct 20, 2019
I think it was added for readable-stream but yeah it seems broken and readable-stream now requires Node.js >= 6.
stream: remove dead code
stream: simplify uint8ArrayToBuffer helper
stream: remove dead code
stream: simplify uint8ArrayToBuffer helper
stream: remove dead code
stream: simplify uint8ArrayToBuffer helper
stream: remove dead code
stream: simplify uint8ArrayToBuffer helper