
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
deru-event-emitter
Advanced tools
global listening events (analogue - Vue event bus)
(best for async logic)
npm i deru-event-emitter --save
Method | Description |
---|---|
subscribe | subscribe to event |
emit | calling event |
Prop | type | Default | Description |
---|---|---|---|
once | Boolean | false | bind event once and remove after calling |
import EventEmitter from 'deru-event-emitter';
require EventEmitter = require('deru-event-emitter');
// main.js
export const emitter = new EventEmitter();
// component.js
import { emitter } from './main.js';
confirmAction() {
return new Promise(resolve => {
emitter.subscribe('confirm', res => {
return resolve(res);
})
})
}
async openModal() {
const confirm = await confirmAction();
if (confirm) {
// some logic
}
}
// modal.js
import { emitter } from './main.js';
confirmModal() {
emitter.emit('confirm', true);
}
FAQs
global listening events (analogue - Vue event bus)
We found that deru-event-emitter 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
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.