Not Particularly Meaningful

char-split

0.2.0 • Public • Published

char-split

Splits a string stream on a character (e.g. \n) and emits the strings in between.

Install

npm install char-split

Usage / Examples

var split = require('char-split')
 
stream.pipe(
    split()
        .on('data', function(data) {
            // line of text
        })
        .on('end', function(data) {
            // end of stream
        })
        .on('error', function(error) {
            // error in stream
        })
)

Optional arguments:

split(character = '\n')

Notes

For simplicity, char-split doesn't support multi-character split strings. This means splitting on \r\n won't work.

License

Open source software under the zlib license.

Keywords

none

install

npm i char-split

Downloadsweekly downloads

2,432

version

0.2.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability