through stream to convert typed arrays and ArrayBuffers to Buffer
npm install tobuffer-streamStream to convert typed arrays and ArrayBuffers to Buffer objects
Usage:
var toBufferStream = require('tobuffer-stream');
somewhere.pipe(toBufferStream)
Typed arrays
are converted with typedarray-to-buffer, avoiding copying.
Useful for use with browserify, where browsers
may emit data using (unaugmented) Uint8Array (etc.), but the augmented Buffer
object type is desired. See also workerstream,
websocket-stream.
MIT