Package Exports
- streamify-string
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 (streamify-string) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
streamify-string
streamify-string accepts a string and returns a Readable stream that
outputs the string. It's useful for stubbing Readable streams when writing
unit-tests for Writeable, Duplex, and Transform streams.
const Streamify = require('streamify-string');
const myWritableStream = require('../path/to/file.js');
// initialize a string
var str = 'Grumpy wizards make toxic brew for the evil Queen and Jack.'
// "Streamify" that string and pipe it to a writeable stream
Streamify(str).pipe(myWriteableStream);Parameters
const streamified = Streamify(str, [options]);str: thestringthat the stream should output.options: Optional options to pass to the stream constructor. (Documentation)
Events
The stream will emit the following events: