Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Package summary
Share
0
issues
0
licenses
Package created
27 Nov 2017
Version published
29 Jan 2024
Maintainers
1
Total deps
0
Direct deps
0
License
MIT
Generating a report...
Hold on while we generate a fresh audit report for this package.

Frequently Asked Questions

What does emittery do?

Emittery is a simple and modern async event emitter that is used in both Node.js and the browser using a bundler. Emitting events asynchronously is significant for production code to minimize the quantity of synchronous operations for optimal performance.

How do you use emittery?

Using Emittery is quite straightforward. First, you need to import the Emittery package and then utilize different methods on the new instance of Emittery according to your needs. For instance, you can create an event, subscribe to an event, unsubscribe from an event, emit an event, and so forth.

//installation
npm install emittery

// usage example
import Emittery from 'emittery';

const emitter = new Emittery();

emitter.on('πŸ¦„', data => {
	console.log(data);
});

emitter.emit('πŸ¦„', '🌈'); // this will trigger the 'console.log' in the 'on' listener above

For detailed usage and to understand all the available methods, you should refer to the API section on the GitHub page of the Emittery library.

Where are the emittery docs?

Emittery's documentation is available directly in its README.md on the GitHub repository. The readme contains detailed information about the library's installation, usage, API, as well as related queries and debugging instructions. If you're developing with TypeScript, there's also a section with information about working with TypeScript with Emittery.