Gathering detailed insights and metrics for tiny-emitter
Gathering detailed insights and metrics for tiny-emitter
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
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
959 Stars
65 Commits
71 Forks
16 Watchers
3 Branches
7 Contributors
Updated on Jun 26, 2025
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
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
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
33 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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