Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
EventBoi is a super-simple, typesafe event bus.
It allows subscribing to pre-defined events and their associated payloads.
npm install event-boi
yarn add event-boi
event-boi
is designed to be used with TypeScript (although there's nothing stopping you from using it in plain JavaScript). The possible events should be declared when creating an event bus instance. The TS compiler will then ensure that only events that exist can be published and subscribed to and that the payloads for each event is correct.
import createEventBus from "event-boi";
// if using TypeScript you must pre-define the events and their payloads.
interface Events {
game_played: { result: "win" | "loss" };
message_sent: string;
}
const MyEventBus = createEventBus<Events>();
const unsubscribe = MyEventBus.subscribe("message_sent", (message) => {
console.log(`A message was sent with the content "${message}"`);
});
// later...
MyEventBus.publish("message_sent", "Hello, world");
// logs: A message was sent with the content "Hello, world"
// to unsubscribe just call the `unsubscribe` function returned from the `subscribe` method:
unsubscribe();
FAQs
A super-simple event bus
The npm package event-boi receives a total of 135 weekly downloads. As such, event-boi popularity was classified as not popular.
We found that event-boi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.