cueue
Tiny, Easy queueing on Promise based.
Last updated 2 years ago by sugarshin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install cueue 
SYNC missed versions from official npm registry.

cueue

CircleCI Coverage Status

Dependency Status Devdependency Status npm version License

Tiny, Easy queueing on Promise based.

yarn add cueue

Usage

import cueue from 'cueue'

const r = i => {
  console.info(i)
  return `iteratee ${i}`
}
const q = cueue(r, 200)
Array.from({ length: 40 }).forEach((_, i) => q.add(i))
q.run().then((...a) => console.info(...a))

API

const q = cueue(func, [delay [, context]])

  • q.add(...args)
  • q.run() return {Promise}
  • q.push(...args) return {Promise}
  • q.stop()
  • q.clear()
  • q.length() return {number}

License

MIT

© sugarshin

Current Tags

  • 1.0.3                                ...           latest (2 years ago)

6 Versions

  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependencies (0)
None
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |