Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@riteable/q-worker

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@riteable/q-worker - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

2

index.js

@@ -49,3 +49,3 @@ const EventEmitter = require('events')

} finally {
_removeProcessingTask(i)
setTimeout(() => _removeProcessingTask(i))
}

@@ -52,0 +52,0 @@ }

{
"name": "@riteable/q-worker",
"version": "1.0.3",
"version": "1.0.4",
"description": "Rate limit and queue async functions.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -41,11 +41,11 @@ const test = require('ava')

queue.add(task)
const task1 = queue.add(task)
const task2 = queue.add(task)
const task3 = queue.add(task)
const result = await new Promise((resolve) => {
queue.events.on('done', () => resolve(true))
setTimeout(() => resolve(false), timeout * 2)
queue.events.on('done', () => resolve(Promise.all([task1, task2, task3])))
})
t.true(result)
t.deepEqual(result, [1, 2, 3])
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc