Nanoseconds Produce Minutes
Have ideas to improve npm?Join in the discussion! »

playback-stream

1.0.0 • Public • Published

playback-stream

NPM Version NPM Downloads Build Status Coverage Status Dependency Status

A stream whose contents can be played back many times by storing its contents in memory.

Install: npm install playback-stream

const PlaybackStream = require('playback-stream');
 
const playback = new PlaybackStream();
 
request('https://placekitten.com/600/400').pipe(playback);
http.createServer((req, resp) => {
  resp.writeHead(200, { 'Content-Type': 'image/jpeg' });
  playback.newReadableSide().pipe(resp);
}).listen(8080);

License

MIT

Install

npm i playback-stream

DownloadsWeekly Downloads

99

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar