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
Generated on Mar 18, 2024 via pnpm

events 1.1.1

Node's event emitter for all engines.
Package summary
Share
0
issues
1
license
1
MIT
Package created
22 Apr 2011
Version published
22 Jun 2016
Maintainers
3
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:
events@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 events 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does events do?

"Events" is a helpful package in Node.js that aims to implement Node's event emitter for all engines. It is specially created for those environments that do not have the Node.js events module, like browsers. The package brings the functionality of the events module according to the Node.js 11.13.0 API. Being built on ES5 features, it requires an es5-shim for support in older browsers like IE8. Remember that this package is typically built-in with Node.js and also included in bundlers like Browserify or Webpack.

How do you use events?

To use the events package, you must first install it via npm with the command npm install events. However, if your code runs in Node.js or in the browser via a bundler like Browserify or Webpack, the events module is likely already included. After the installation, you can require the events module into your Javascript file.

Here is a simple usage example:

var EventEmitter = require('events')

var ee = new EventEmitter()
ee.on('message', function (text) {
  console.log(text)
})
ee.emit('message', 'hello world')

In this example, a new instance of EventEmitter is created. The ee.on method is then used to specify the 'message' event and its corresponding callback function that will execute when the event occurs. The ee.emit method triggers the 'message' event and passes 'hello world' as text.

Where are the events docs?

As for the documentation, events provides an exact match to the Node.js API (specifically Node.js 11.13.0). Thus, the complete documentation for the events module can be found at the Node.js 11.13.0 EventEmitter documentation. It is also worth mentioning that contributions to this package are encouraged, particularly through porting features, bugfixes, and tests from Node.js.