Gathering detailed insights and metrics for tiny-emitter
Gathering detailed insights and metrics for tiny-emitter
npm install tiny-emitter
Typescript
Module System
Node Version
NPM Version
99.4
Supply Chain
95.7
Quality
75.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
934,137,926
Last Day
718,201
Last Week
4,022,124
Last Month
16,883,865
Last Year
166,809,694
MIT License
947 Stars
65 Commits
70 Forks
16 Watchers
3 Branches
7 Contributors
Updated on Feb 22, 2025
Minified
Minified + Gzipped
Latest Version
2.1.0
Package Id
tiny-emitter@2.1.0
Size
21.82 kB
NPM Version
6.4.1
Node Version
8.12.0
Published on
Feb 05, 2019
Cumulative downloads
Total Downloads
Last Day
-2.4%
718,201
Compared to previous day
Last Week
-2.8%
4,022,124
Compared to previous week
Last Month
10.6%
16,883,865
Compared to previous month
Last Year
17.2%
166,809,694
Compared to previous year
5
A tiny (less than 1k) event emitter library.
npm install tiny-emitter --save
1var Emitter = require('tiny-emitter'); 2var emitter = new Emitter(); 3 4emitter.on('some-event', function (arg1, arg2, arg3) { 5 // 6}); 7 8emitter.emit('some-event', 'arg1 value', 'arg2 value', 'arg3 value');
Alternatively, you can skip the initialization step by requiring tiny-emitter/instance
instead. This pulls in an already initialized emitter.
1var emitter = require('tiny-emitter/instance'); 2 3emitter.on('some-event', function (arg1, arg2, arg3) { 4 // 5}); 6 7emitter.emit('some-event', 'arg1 value', 'arg2 value', 'arg3 value');
Subscribe to an event
event
- the name of the event to subscribe tocallback
- the function to call when event is emittedcontext
- (OPTIONAL) - the context to bind the event callback toSubscribe to an event only once
event
- the name of the event to subscribe tocallback
- the function to call when event is emittedcontext
- (OPTIONAL) - the context to bind the event callback toUnsubscribe from an event or all events. If no callback is provided, it unsubscribes you from all events.
event
- the name of the event to unsubscribe fromcallback
- the function used when binding to the eventTrigger a named event
event
- the event name to emitarguments...
- any number of arguments to pass to the event subscribersBuild (Tests, Browserifies, and minifies)
npm install
npm run build
Test
npm install
npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 6/17 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
30 existing vulnerabilities detected
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