Installations
npm install tiny-emitter
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.12.0
NPM Version
6.4.1
Score
98.2
Supply Chain
95.7
Quality
75.9
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
scottcorgan
Download Statistics
Total Downloads
897,165,832
Last Day
138,029
Last Week
2,235,260
Last Month
13,598,785
Last Year
157,708,285
GitHub Statistics
943 Stars
65 Commits
68 Forks
17 Watching
3 Branches
7 Contributors
Bundle Size
739.00 B
Minified
410.00 B
Minified + Gzipped
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
897,165,832
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
5
tiny-emitter
A tiny (less than 1k) event emitter library.
Install
npm
npm install tiny-emitter --save
Usage
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');
Instance Methods
on(event, callback[, context])
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 to
once(event, callback[, context])
Subscribe 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 to
off(event[, callback])
Unsubscribe 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 event
emit(event[, arguments...])
Trigger a named event
event
- the event name to emitarguments...
- any number of arguments to pass to the event subscribers
Test and Build
Build (Tests, Browserifies, and minifies)
npm install
npm run build
Test
npm install
npm test
License

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
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
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 19 are checked with a SAST tool
Reason
28 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-g74r-ffvr-5q9f
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-vwjc-q9px-r9vq
- Warn: Project is vulnerable to: GHSA-pm9p-9926-w68m
- Warn: Project is vulnerable to: GHSA-9q64-mpxx-87fg
- Warn: Project is vulnerable to: GHSA-jc84-3g44-wf2q
- Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2
- Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-f9cm-qmx5-m98h
- Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp
- Warn: Project is vulnerable to: GHSA-wrvr-8mpx-r7pp
- Warn: Project is vulnerable to: GHSA-hxm2-r34f-qmc5
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-4cpg-3vgw-4877
- Warn: Project is vulnerable to: GHSA-qg8p-v9q4-gh34
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-34r7-q49f-h37c
- Warn: Project is vulnerable to: GHSA-c9f4-xj24-8jqx
Score
2.1
/10
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