Installations
npm install events
Score
99.9
Supply Chain
84.8
Quality
79.8
Maintenance
100
Vulnerability
100
License
Developer
Gozala
Developer Guide
Module System
CommonJS
Min. Node Version
>=0.8.x
Typescript Support
No
Node Version
15.10.0
NPM Version
6.14.11
Statistics
1,390 Stars
140 Commits
175 Forks
18 Watching
6 Branches
41 Contributors
Updated on 28 Nov 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
7,288,921,419
Last day
-22.9%
6,153,705
Compared to previous day
Last week
-4.9%
40,905,568
Compared to previous week
Last month
4.1%
176,733,719
Compared to previous month
Last year
12%
1,810,289,659
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
6
events
Node's event emitter for all engines.
This implements the Node.js events
module for environments that do not have it, like browsers.
events
currently matches the Node.js 11.13.0 API.
Note that the events
module uses ES5 features. If you need to support very old browsers like IE8, use a shim like es5-shim
. You need both the shim and the sham versions of es5-shim
.
This module is maintained, but only by very few people. If you'd like to help, let us know in the Maintainer Needed issue!
Install
You usually do not have to install events
yourself! If your code runs in Node.js, events
is built in. If your code runs in the browser, bundlers like browserify or webpack also include the events
module.
But if none of those apply, with npm do:
npm install events
Usage
1var EventEmitter = require('events') 2 3var ee = new EventEmitter() 4ee.on('message', function (text) { 5 console.log(text) 6}) 7ee.emit('message', 'hello world')
API
See the Node.js EventEmitter docs. events
currently matches the Node.js 11.13.0 API.
Contributing
PRs are very welcome! The main way to contribute to events
is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js.
This module intends to provide exactly the same API as Node.js, so features that are not available in the core events
module will not be accepted. Feature requests should instead be directed at nodejs/node and will be added to this module once they are implemented in Node.js.
If there is a difference in behaviour between Node.js's events
module and this module, please open an issue!
License
No vulnerabilities found.
Reason
security policy file detected
Details
- Info: security policy file detected: security.md:1
- Info: Found linked content: security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: security.md:1
- Info: Found text in security policy: security.md:1
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/13 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 21 are checked with a SAST tool
Score
4.5
/10
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More