@derhuerst/round-robin-scheduler

1.0.4 • Public • Published

round-robin-scheduler

A round-robin scheduler, compatible with the abstract-scheduler interface.

compatible with abstract-scheduler

npm version build status ISC-licensed chat with me on Gitter support me on Patreon

Installation

npm install @derhuerst/round-robin-scheduler

Usage

const createRoundRobin = require('@derhuerst/round-robin-scheduler')

const roundRobin = createRoundRobin(['foo', 'bar'])

roundRobin.get() // foo
roundRobin.get() // bar
roundRobin.add('baz') // 2
roundRobin.length // 3
roundRobin.get() // baz
roundRobin.remove(0) // remove first item
roundRobin.get() // bar

roundRobin is compatible with the abstract-scheduler interface.

Contributing

If you have a question or need support using round-robin-scheduler, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

Dependents (2)

Package Sidebar

Install

npm i @derhuerst/round-robin-scheduler

Weekly Downloads

250

Version

1.0.4

License

LAGPL

Unpacked Size

4.35 kB

Total Files

4

Last publish

Collaborators

  • derhuerst