
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
@yaro.page/nano-events
Advanced tools
nano-events is a minimal implementation for event handling that can be used in any environment.
The EventEmitter class is a minimal implementation for event handling.
.on(event, listener) registers a listener..off(event, listener) removes a listener..emit(event, data) notifies all listeners.BrowserEventEmitter extends EventEmitter to dispatch events using window or any EventTarget.
on(event, listener) binds to native event with CustomEvent.detail.emit(event, data) dispatches CustomEvent with detail.off(event, listener) removes event binding.import { BrowserEventEmitter } from '@yaro.page/nano-events'
const bus = new BrowserEventEmitter()
bus.on('hello', (data) => console.log(data))
bus.emit('hello', { msg: 'Hi 👋' })
Use with the node.js EventEmitter
import { EventEmitter as NodeEventEmitter } from 'node:events'
import { NanoEvent } from '@yaro.page/nano-events'
class NanoEventWithEmitter extends NanoEvent {
createEmitter() {
return new NodeEventEmitter()
}
}
const bus = new NanoEventWithEmitter()
let processed = false
bus.on('hello', (data) => {
processed = data
})
bus.emit('hello', { msg: 'Hi 👋' })
console.log(processed) // { msg: 'Hi 👋' }
FAQs
Cross platform event emitter
The npm package @yaro.page/nano-events receives a total of 1 weekly downloads. As such, @yaro.page/nano-events popularity was classified as not popular.
We found that @yaro.page/nano-events demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.