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
98.2
Supply Chain
95.7
Quality
75.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
897,165,832
Last Day
138,029
Last Week
2,235,260
Last Month
13,598,785
Last Year
157,708,285
943 Stars
65 Commits
68 Forks
17 Watching
3 Branches
7 Contributors
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
Publised On
05 Feb 2019
Cumulative downloads
Total Downloads
Last day
-78.6%
138,029
Compared to previous day
Last week
-34.5%
2,235,260
Compared to previous week
Last month
-8.6%
13,598,785
Compared to previous month
Last year
9%
157,708,285
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
28 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-16
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