Promisify Event Emitters
JSON →event-emitter-promisify is a lightweight JavaScript and TypeScript utility library designed to convert Node.js `EventEmitter` instances into standard Promises. It enables developers to integrate asynchronous `async/await` syntax with traditional event-driven patterns, specifically by resolving a Promise when a success event (defaulting to 'end') is emitted, and rejecting it upon an 'error' event. The library provides a single, focused function, `promisifyEventEmitter`, which simplifies handling the lifecycle of event emitters in a Promise-based workflow. The current stable version is 1.1.0, released in February 2022. While functional and stable, the project exhibits an infrequent release cadence, with no major updates since its initial introduction. Its primary differentiation lies in offering a specialized solution for EventEmitters, distinguishing it from general-purpose promisification utilities like `util.promisify` that target Node.js-style callback functions.
Traffic · last 30 days ↑200% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇳🇴 Norway · 🇦🇺 Australia · 🇩🇪 Germany