Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

named-queue

Ivshti435MIT2.2.1

like async.queue, but you name the tasks so they're de-duplicated

named, queue, async, flow

readme

named-queue

like async.queue, but tasks are named and de-duplicated

Init

var namedQueue = require('named-queue')

var queue = new namedQueue(processor, concurrency)

processor - function(task, cb)

concurrency - Number for maximum concurrent tasks; can be Infinity

Methods

WARNING All tasks must have an .id property used to identify and avoid doing the same task more than once at a time

queue.push(task, cb)

queue.unshift(task, cb)

queue.length()