![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.
queue-event-emitter
Advanced tools
Simple `EventEmitter` which runs every event handler in a queue
QueueEventEmitter
is a simple EventEmitter
which runs every event handler in a queue.
npm i --save queue-event-emitter
const QueueEventEmitter = require('queue-event-emitter')
// helper function
const sleep = (time) => (
new Promise((resolve) => setTimeout(resolve, time))
)
// event emitter
const emitter = new QueueEventEmitter()
// event handlers, should return promise
emitter.on('first', async (data) => {
await sleep(3000)
console.log('data:', data)
})
emitter.on('second', async (data) => {
await sleep(1000)
console.log('data:', data)
})
emitter.on('third', async (data) => {
await sleep(10)
console.log('data:', data)
})
// send events
emitter.emit('first', 10)
emitter.emit('second', 20)
emitter.emit('third', 30)
emitter.emit('first', 40)
emitter.emit('third', 50)
emitter.emit('third', 60)
emitter.emit('second', 70)
// result in console will be
// data: 10
// data: 20
// data: 30
// data: 40
// data: 50
// data: 60
// data: 70
Implements the same api as node's EventEmitter.
QueueEventEmitter
class accepts following options:
options.concurrency
<number>
The maximum number of events to execute at once. (Default: 1)Licensed under MIT
FAQs
Simple `EventEmitter` which runs every event handler in a queue
The npm package queue-event-emitter receives a total of 105 weekly downloads. As such, queue-event-emitter popularity was classified as not popular.
We found that queue-event-emitter 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
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.