Skip to content

[FEATURE REQUEST] flush option #8

Description

@jonathanong

not sure how this would work API-wise, but the idea is to return a promise somewhere that resolves then there is no longer any promises in the queue.

const fn = throat(3, myOtherFunction)

fn(1)
fn(2)
fn(3)
fn(4)

fn.flush().then(doSomethingElse())

it should resolve immediately if there are no more functions in the queue. flush should throw if any of the promises in the queue failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions