![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@prezly/events
Advanced tools
Event emitter with DOM-like EventTarget API & strong TypeScript typings
Event emitter with DOM-like EventTarget
API & strong TypeScript typings.
There's this great mitt package which implements EventEmitter
interface from node.js but it does not have strong typings. There's a PR pending with this feature, but there's been no activity for 7 months. Perhaps in the future we might not want to maintain this @prezly/events
package. But on the other hand, we should think twice before using a package where last PR got merged over half year ago.
Demo: https://codesandbox.io/s/prezlyevents-demo-2k7pd
import { Events } from '@prezly/events';
const ref = { current: 0 };
const events = new Events<{
add: number;
substract: number;
log: never; // "never" means that event has no payload
}>();
const add = (value: number) => {
ref.current += value;
};
const substract = (value: number) => {
ref.current -= value;
};
const log = () => {
console.log(ref.current);
};
// Attach event handlers
events.addEventListener('add', add);
events.addEventListener('substract', substract);
const removeLogListener = events.addEventListener('log', log);
// Dispatch events
events.dispatchEvent('add', 2);
events.dispatchEvent('substract', 5);
events.dispatchEvent('log');
// Remove event handlers
events.removeEventListener('add', add);
events.removeEventListener('substract', substract);
removeLogListener(); // this is another way to unsubscribe event listener
Brought to you by Prezly.
FAQs
Event emitter with DOM-like EventTarget API & strong TypeScript typings
The npm package @prezly/events receives a total of 102 weekly downloads. As such, @prezly/events popularity was classified as not popular.
We found that @prezly/events demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.