Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Jun 14, 2024 via pnpm

ee-first 1.1.1

return the first event in a set of ee/event pairs
Package summary
Share
0
issues
1
license
1
MIT
Package created
11 Jun 2014
Version published
25 May 2015
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
ee-first@1.1.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of ee-first 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does ee-first do?

EE-First is a Node.js module that is designed to return the first event among a set of event emitters and event pairs. Its primary function is to invoke a listener on the first event from a specific list, and then clean up after itself. This versatile library provides programmatic control over an application's event-driven functionality, allowing developers to focus on the sequence of events.

How do you use ee-first?

To use EE-First, you need to install it first via npm (Node Package Manager) by running the command npm install ee-first. After successful installation, you can import it into your JavaScript file using var first = require('ee-first'). EE-First accepts two parameters mainly: arr (an array of arrays, with each array in the format [ee, ...event]), and listener (a function that will be called once, the first time any of the given events are emitted). For example:

var ee1 = new EventEmitter()
var ee2 = new EventEmitter()

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

You can cancel the set of listeners as well before being invoked and have all the event listeners removed from the underlying event emitters as follows:

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

// cancel and clean up
thunk.cancel()

Where are the ee-first docs?

The documentation for EE-first is currently embedded within the README.md file in the GitHub repository of the module named ee-first, where you'll find a detailed explanation and examples of its functionalities and usage. You may also find additional insights from comments and closed issues within the repository.