Gathering detailed insights and metrics for @silveredgold/ste-simple-events
Gathering detailed insights and metrics for @silveredgold/ste-simple-events
npm install @silveredgold/ste-simple-events
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (89.55%)
HTML (5.6%)
JavaScript (4.23%)
PowerShell (0.62%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,524
Last Day
3
Last Week
14
Last Month
45
Last Year
326
MIT License
138 Stars
747 Commits
14 Forks
8 Watchers
6 Branches
9 Contributors
Updated on Dec 19, 2024
Minified
Minified + Gzipped
Latest Version
2.1.16-alpha4
Package Id
@silveredgold/ste-simple-events@2.1.16-alpha4
Unpacked Size
14.10 kB
Size
3.66 kB
File Count
18
NPM Version
7.24.2
Node Version
14.16.0
Cumulative downloads
Total Downloads
Last Day
200%
3
Compared to previous day
Last Week
-17.6%
14
Compared to previous week
Last Month
200%
45
Compared to previous month
Last Year
-37.9%
326
Compared to previous year
1
8
Simple events are a type of event that will provide an argument
with data when fired. If you use typescript, you can leverage the support for generics and get strongly typed code.
Need a different type of event? Check out the others.
An example says more than a 1000 words. Imagine if you have events like this on your class:
1let clock = new Clock("Smu", 1000); 2 3//log the name of the clock and the tick argument to the console - this is an event 4clock.onClockTick.subscribe((c, n) => 5 console.log(`${c.name} ticked ${n} times.`) 6);
So let's look at the implementation from a TypeScript perspective. (Do you program NodeJs without typescript? Check this)
1import { SimpleEventDispatcher } from "ste-simple-events"; 2 3class Clock { 4 private _onSequenceTick = new SimpleEventDispatcher<number>(); 5 private _ticks: number = 0; 6 7 constructor(public name: string, timeout: number) { 8 setInterval(() => { 9 this._ticks += 1; 10 this._onSequenceTick.dispatch(this._ticks); 11 }, timeout); 12 } 13 14 public get onSequenceTick() { 15 return this._onSequenceTick.asEvent(); 16 } 17}
Check the documentation or the examples for more information.
Need more info? Check the repo.
This project is maintained by Kees C. Bakker.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
Found 0/17 approved changesets -- score normalized to 0
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
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
15 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
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