Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
💧Type safe replacement for Node's EventEmitter💧
'evt'
is intended to be a replacement for Node's 'events'
and a lighter alternative to 'rxjs'
.
It enable and encourage functional programming and makes heavy use of typescript's type inference features to provide type safety while keeping things concise and elegant 🍸.
Browserify friendly:
import { Evt } from "evt";
const evtText = new Evt<string>();
const evtTime = new Evt<number>();
evtText.attach(text => console.log(text));
evtTime.attachOnce(time => console.log(time));
evtText.post("hi!");
evtTime.post(123);
evtTime.post(1234);
OR
import { Evt, to } from "evt";
const evt = new Evt<
[ "text", string ] |
[ "time", number ]
>();
evt.$attach(to("text"), text => console.log(text));
evt.$attachOnce(to("time"), time => console.log(time));
evt.post(["text", "hi!"]);
evt.post(["time", 123]);
evt.post(["time", 1234]);
*Those are introductory examples, EVT can do much more than this.
There are a lot of things that can't easily be done with EventEmitter
:
RxJS have its issues as well:
EVT is an attempt to solve all these issues while trying to remain as accessible as EventEmitter
.
FAQs
Type safe replacement for node's EventEmitter
The npm package evt receives a total of 8,234 weekly downloads. As such, evt popularity was classified as popular.
We found that evt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.