
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Feast, festival, celebration
Juhla is a wrapper around the native Event Target interface. It clocks in at around 290b (195b gzip, 167b br), and uses familiar methods.
import { juhla } from 'juhla'; // notice it is juhla and not fête
const evt = juhla();
const myHandler = ({ detail }) => console.log(detail);
evt.on('my-custom-event', myHandler);
evt.emit('my-custom-event', { detail: 'hi :)' }); // hi :)
evt.off('my-custom-event', myHandler);
// or use one to run the handler one time
evt.one('my-custom-event', myHandler);
If you need to namespace events, pass a string to the first parameter.
const myEvt = juhla('me');
const yourEvt = juhla('you');
myEvt.on('greeting', () => console.log('hi!'));
yourEvt.on('greeting', () => console.log('yoyoyo'));
myEvt.emit('greeting') // hi!
yourEvt.emit('greeting') // yoyoyo
Aliased events, like $(document).click() from jQuery, are also supported.
const $ = juhla();
$.click(incr); // is the same as
$.on('click', incr);
$.customEvent(incr); // custom events are _techinically_ supported
$.emit('customEvent'); // using $.on for these preferred
While all of the events are there, this also means some events that are longer are not given their shorter counterparts
For example, jQuery's .ready() event handler would become .DOMContentLoaded().
This is on the todo list, but would require increasing the size limit to achieve
ready for DOMContentLoadedFAQs
> Feast, festival, celebration
We found that juhla 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.