highland-callback

1.0.1 • Public • Published

Highland Callback

Run callback after a stream is complete. This will run the callback once, on the first error or when the stream has finished. Note that you should only use this as the last .consume in the stream chain.

Install

npm install highland-callback

Usage

var _ = require('highland');
var highlandCallback = require('highland-callback');

_([1, 2, 3])
.consume(highlandCallback(function(error) {
  // executed after nil is seen, in this case all the values will be logged before this is executed
  console.log('executed');
  console.log('hi');
}))
.doto(function(value) {
  console.log(value);
})
.resume();

// output:
// 1
// 2
// 3
// executed

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    283
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    283
  • 1.0.0
    0

Package Sidebar

Install

npm i highland-callback

Weekly Downloads

246

Version

1.0.1

License

MIT

Last publish

Collaborators

  • ibash