Gathering detailed insights and metrics for @servie/events
Gathering detailed insights and metrics for @servie/events
Gathering detailed insights and metrics for @servie/events
Gathering detailed insights and metrics for @servie/events
npm install @servie/events
Typescript
Module System
Node Version
NPM Version
99.8
Supply Chain
88.4
Quality
75.5
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
14,474,124
Last Day
13,834
Last Week
65,189
Last Month
297,420
Last Year
4,593,456
26 Stars
28 Commits
1 Forks
2 Watching
1 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
3.0.0
Package Id
@servie/events@3.0.0
Size
5.15 kB
NPM Version
7.9.0
Node Version
15.14.0
Publised On
13 Apr 2021
Cumulative downloads
Total Downloads
Last day
-12.9%
13,834
Compared to previous day
Last week
-14.4%
65,189
Compared to previous week
Last month
-1.5%
297,420
Compared to previous month
Last year
22.8%
4,593,456
Compared to previous year
Tiny type-safe event emitter.
npm install @servie/events --save
1import { Emitter, once, ALL_EVENTS } from "@servie/events"; 2 3// Define an events interface using keys & argument tuples. 4interface Events { 5 test: [boolean]; 6 other: [string]; 7} 8 9// Initialize an `Emitter` using your `Events` interface. 10const events = new Emitter<Events>(); 11 12// Add or remove listeners. 13const listener = (...args) => console.log(args); 14const off = events.on("test", listener); 15 16// Emit an event. 17events.emit("test", true); 18 19// Listen to _all_ events, i.e. for debugging. 20const eachListener = ({ type, args }) => console.log(type, args); 21const off = events.on(ALL_EVENTS, eachListener); 22 23// "Once" utility. 24const runOnce = (...args) => console.log(args); 25once(events, "test", runOnce); 26 27// Remove the listener. 28off();
This project is written using TypeScript and publishes the definitions directly to NPM.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/25 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
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
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
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