on-new-line
Hijacks NodeJS Stream and emits events when newline(s) written to the output.
Last updated 10 years ago by bubkoo .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install on-new-line 
SYNC missed versions from official npm registry.

on-new-line

Hijacks NodeJS Stream and emits events when newline(s) written to the output.

MIT License npm:

Install

$ npm install on-new-line --save

Usage

require('on-new-line')(stream); // Any type of NodeJS stream, such as: filestream, process.stdout etc.

// emitted on every newline detected
stream.on('newline', function() {

});

// emitted before data written to the output. 
stream.on('before:newlines', function(lineCount) {

});

// emitted after data written to the output. 
stream.on('after:newlines', function(lineCount) {

});

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

Current Tags

  • 1.0.0                                ...           latest (10 years ago)

2 Versions

  • 1.0.0                                ...           10 years ago
  • 0.0.1                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |