Gathering detailed insights and metrics for @socket.io/component-emitter
Gathering detailed insights and metrics for @socket.io/component-emitter
npm install @socket.io/component-emitter
Typescript
Module System
Node Version
NPM Version
99.9
Supply Chain
93
Quality
77
Maintenance
100
Vulnerability
100
License
JavaScript (99.28%)
Makefile (0.72%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
538,599,458
Last Day
1,021,307
Last Week
5,528,085
Last Month
27,701,626
Last Year
270,313,417
MIT License
4 Stars
99 Commits
2 Forks
1 Watchers
4 Branches
1 Contributors
Updated on Oct 29, 2024
Minified
Minified + Gzipped
Latest Version
3.1.2
Package Id
@socket.io/component-emitter@3.1.2
Unpacked Size
20.72 kB
Size
3.98 kB
File Count
9
NPM Version
9.6.7
Node Version
20.3.0
Published on
Apr 26, 2024
Cumulative downloads
Total Downloads
Last Day
-6.8%
1,021,307
Compared to previous day
Last Week
-18.1%
5,528,085
Compared to previous week
Last Month
4%
27,701,626
Compared to previous month
Last Year
48.5%
270,313,417
Compared to previous year
@socket.io/component-emitter
Event emitter component.
This project is a fork of the component-emitter
project, with Socket.IO-specific TypeScript typings.
$ npm i @socket.io/component-emitter
The Emitter
may also be used as a mixin. For example
a "plain" object may become an emitter, or you may
extend an existing prototype.
As an Emitter
instance:
1import { Emitter } from '@socket.io/component-emitter'; 2 3var emitter = new Emitter; 4emitter.emit('something');
As a mixin:
1import { Emitter } from '@socket.io/component-emitter'; 2 3var user = { name: 'tobi' }; 4Emitter(user); 5 6user.emit('im a user');
As a prototype mixin:
1import { Emitter } from '@socket.io/component-emitter'; 2 3Emitter(User.prototype);
Register an event
handler fn
.
Register a single-shot event
handler fn
,
removed immediately after it is invoked the
first time.
event
and fn
to remove a listener.event
to remove all listeners on that event.Emit an event
with variable option args.
Return an array of callbacks, or an empty array.
Check if this emitter has event
handlers.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
license file detected
Details
Reason
5 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-03-03
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