Closed
Description
Noticed this bit of code in lib/stream.js
on the master branch:
const version = process.version.substr(1).split('.');
if (version[0] === 0 && version[1] < 12) {
Stream._uint8ArrayToBuffer = Buffer;
} else {
...
- 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.
- It looks like it's checking for node
0.x < 0.12
?? - Splitting a string returns an array of strings, so
version[0] === 0
would always returnfalse
even in node 0.11 and before.
I think this can be removed?
- Version: 12.12.0
- Platform: All
- Subsystem: stream