
Security News
Node.js Drops Bug Bounty Rewards After Funding Dries Up
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.
fn-eventify
Advanced tools
fn-eventify attach EventEmitter interface to Function.
npm install fn-eventify
The first, You should initialize fn-eventify like a creating an instace of EventEmitter.
import * as Eventify from 'fn-eventify'
const Eventor = Eventify.create();
Eventor has eventify(), subscribe() and subscribeAll()
const fn = () => 'hello world';
const greet = Eventor.eventify('GREET', fn);
Callback function can return Promise.
Eventor.eventify('ASYNC_SOMETHING', () => Promise.resolve());
const unsubscribe = greet.subscribe((event) => {...});
unsubscribe();
const unsubscribe = Eventor.subscribe('GREET', (event) => {...})
unsubscribe();
You can listen all event.
const unsubscribe = Eventor.subscribeAll((event) => {...})
unsubscribe();
To publish, You just call eventified function simply.
const message = greet() // return result and pubslish event
assert.equal(message, 'hello world')
{
name: string; // event name
payload: any; // something that returned by function
}
You can use inject((event: EventifyEvent) => EventifyEvent | {[prop: string]: any}).
const greet = Eventor.eventify('GREET', (message) => `${message}`)
.inject((event) => Object.assign(event, { greetor: 'cotto' })) // inject by callback
or
const greet = Eventor.eventify('GREET', (message) => `${message}`)
.inject({ greetor: 'cotto' }) // inject by Object
then
greet.subscribe((event) => {
assert.deepEqual(event, {
name: 'GREET',
payload: 'hello world',
greetor: 'cotto' // injected extra props
})
})
greet('hello world'); //-> hello world
FAQs
fn-eventify
We found that fn-eventify 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
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.