JSPM

streamifier

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 372007
  • Score
    100M100P100Q182042F

Converts a Buffer/String to a readable stream

Package Exports

  • streamifier

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (streamifier) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

streamifier

Node.js project

Converts a Buffer/String to a readable stream

Version: 0.0.1

There are times when you have a buffer/string but you need to pipe it to a writable stream. You could write it to a temporary file and create a readable stream that reads from it or you could simply convert the buffer/string to a readable stream.

Installation

npm install streamifier

Example

var streamifier = require ("streamifier");

streamifier.createReadStream (new Buffer ("my string", "utf8")).pipe (process.stdout);
//Prints: my string

streamifier.createReadStream ("my string").pipe (process.stdout);
//Prints: my string