streamify-string

WebJar for streamify-string

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

streamify-string
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

streamify-string
WebJar for streamify-string
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/chrisallenlane/streamify-string

Download streamify-string

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/streamify-string/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>streamify-string</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/streamify-string/
implementation 'org.webjars.npm:streamify-string:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/streamify-string/
implementation ("org.webjars.npm:streamify-string:1.0.1")
'org.webjars.npm:streamify-string:jar:1.0.1'
<dependency org="org.webjars.npm" name="streamify-string" rev="1.0.1">
  <artifact name="streamify-string" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='streamify-string', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "streamify-string" % "1.0.1"
[org.webjars.npm/streamify-string "1.0.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Build Status npm npm

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: the string that the stream should output.
  • options: Optional options to pass to the stream constructor. (Documentation)

Events

The stream will emit the following events:

Versions

Version
1.0.1