from2-string

Create a stream from a string. Sugary wrapper around from2

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
from2-string
1601.1.08 years ago8 years agoMinified + gzip package size for from2-string in KB

Readme

from2-string
!NPM versionnpm-imagenpm-url !build statustravis-imagetravis-url !Test coveragecoveralls-imagecoveralls-url !Downloadsdownloads-imagedownloads-url !js-standard-stylestandard-imagestandard-url
Create a stream from a string. Sugary wrapper around from2.

Installation

$ npm install from2-string

Usage

const fromString = require('from2-string')

fromString('hello world').pipe(process.stdout)

Why

In order to use from2 with strings, you must write some boilerplate to break the string in correctly sized chunks. This module handles that boilerplate for you, so you can directly source from a string.

See Also

  • from2 - Convenience wrapper for ReadableStream, with an API lifted from "from" and "through2"
  • from2-array - Create a from2 stream based on an array of source values

License

MIT