mafintosh / duplexify

Turn a writable and readable stream into a streams2 duplex stream with support for async initialization and streams1/streams2 input
MIT License
190 stars 36 forks source link

use safe-buffer module to make Buffer.from() available in old versions of Node.js #18

Closed Trott closed 6 years ago

Trott commented 6 years ago

(Happy to modify it so it only touches the tests if you'd prefer to not add a module to the actual library code, since there's already code in there to avoid Buffer constructor if Buffer.from() exists.)

ChALkeR commented 6 years ago

@Trott I specifically patched this in https://github.com/mafintosh/duplexify/pull/17 without extra deps.

A one-liner shouldn't require an extra dependency. Perhaps move that to dev deps only, if it's required for tests? (And leave index.js as-is).

Trott commented 6 years ago

@ChALkeR Sure, done.

Trott commented 6 years ago

I think since #17 landed, this is obsolete but if I'm mistaken, by all means, re-open.