spit

3.1.0 • Public • Published

spit

Spit is an event emitter that leverages asynchronous methods.

There are two key differences between it and the node.js core event emitter.

The emit() method returns a promise that will be resolved or rejected when all listeners have completed.

The on() or addListener() method accepts two parameters, an event name and a method that will receive all arguments that were emitted on that event. You may return a promise within the method if you need to do any asynchronous processing.

Readme

Keywords

none

Package Sidebar

Install

npm i spit

Weekly Downloads

1

Version

3.1.0

License

MIT

Last publish

Collaborators

  • nlf
  • latentflip