events.once
Polyfill for Node core events.once
.
Usage
events.once
can be used directly or can polyfill
the events module.
Polyfill
const once EventEmitter = { const ee = process const value = await console const err = 'kaboom' process try await catch err console }
Instead of requiring directly it can also be preloaded when starting a process:
node -r events.once/polyfill my-app.js
As an export
const once = const EventEmitter = { const ee = process const value = await console const err = 'kaboom' process try await catch err console }
Does it work with WebPack?
Yes
Does it work with Browserify?
Yes
License
MIT