Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@ohae/events
Advanced tools
This package contained event system (implements a SimpleEventEmitter and ...)
This package contained event system (implements a SimpleEventEmitter and ...)
!!! IN DEVELOPING !!!
npm install @ohae/events --save
const { SimpleEventEmitter, EventListener } = require('@ohae/events');
const emitter = new SimpleEventEmitter();
emitter.on("event1", function (data){
console.log(data); // {value1: 1, value2: "1111"}
});
emitter.emit("event1", {value1: 1, value2: "1111"});
emitter.once("event2", function (data){
console.log(data); // {value1: "1111", value2: false}
});
emitter.emit("event2", {value1: "1111", value2: false});
import { SimpleEventEmitter } from '@ohae/events';
const emitter = new SimpleEventEmitter();
emitter.on("event1", function (data){
console.log(data); // {value1: 1, value2: "1111"}
});
emitter.emit("event1", {value1: 1, value2: "1111"});
emitter.once("event2", function (data){
console.log(data); // {value1: "1111", value2: false}
});
emitter.emit("event2", {value1: "1111", value2: false});
import { SimpleEventEmitter } from '@ohae/events';
const emitter: SimpleEventEmitter = new SimpleEventEmitter();
interface Data1 {
value1: number,
value2: string,
};
declare type Data2 = {
value1: string,
value3: any,
};
emitter.on("event1", function (data: Data1){
console.log(data); // {value1: 1, value2: "1111"}
});
emitter.emit("event1", {value1: 1, value2: "1111"} as Data1);
emitter.once("event2", function (data: Data2){
console.log(data); // {value1: "1111", value2: false}
});
emitter.emit("event2", {value1: "1111", value2: false} as Data2);
MIT
FAQs
This package contained event system (implements a SimpleEventEmitter and ...)
We found that @ohae/events 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.