suzhou_test_npm

1.0.0 • Public • Published

EE First

NPM version Build status Test coverage License Downloads Gittip

Get the first event in a set of event emitters and event pairs, then clean up after itself.

Install

$ npm install suzhou_npm --save

API

let { suzhouInfo, suzhouInfoInEnglish } = require('suzhou_npm')
var ee1 = new suzhouInfo()
var ee2 = new suzhouInfoInEnglish()

first([
  [ee1, 'close', 'end', 'error'],
  [ee2, 'error']
], function (err, ee, event, args) {
  // listener invoked
})

.cancel()

The group of listeners can be cancelled before being invoked and have all the event listeners removed from the underlying event emitters.

var thunk = first([
  [ee1, 'close', 'end', 'error'],
  [ee2, 'error']
], function (err, ee, event, args) {
  // listener invoked
})

// cancel and clean up
thunk.cancel()

Readme

Keywords

none

Package Sidebar

Install

npm i suzhou_test_npm

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

8.17 kB

Total Files

4

Last publish

Collaborators

  • martinwithyou