Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
abstract-scheduler
Advanced tools
Readme
An interface and test suite to implement various scheduling algorithms. The goal is to define a simple and flexible standard for libraries that implement scheduling algorithms, so that you can replace them easily.
const createScheduler = require('any-abstract-scheduler-compatible')
const servers = createScheduler(['1.example.com', '2.example.com'])
servers.get() // '1.example.com'
servers.get() // '2.example.com'
servers.get() // '1.example.com'
abstract-scheduler
-compatible modulesSend a PR by adding yours!
@derhuerst/round-robin-scheduler
– A round-robin scheduler.Include this badge if you make a library compatible with abstract-scheduler
.
[![compatible with abstract-scheduler](https://unpkg.com/abstract-scheduler@4/badge.svg)](https://github.com/derhuerst/abstract-scheduler)
abstract-scheduler
compatibilitynpm i abstract-scheduler --save-dev
Include this in your test file:
const runAbstractSchedulerTests = require('abstract-scheduler')
const createMyScheduler = require('.')
runAbstractSchedulerTests(createMyScheduler)
tape
will be used to test, writing TAP to stdout
.
abstract-scheduler
APIcreateScheduler(values = [])
Create an empty scheduler or provide some initial values.
scheduler.add(value)
Add a value to the scheduler. Returns the (0
-based) index of the stored value.
scheduler.remove(i)
Remove a value by (0
-based) index. Returns true
if the scheduler contained value, false
otherwise.
scheduler.has(value)
Checks whether the given value is already in the scheduler. Returns either true
or false
.
scheduler.get()
Get the next value according to the scheduling algorithm.
abstract-scheduler
is inspired by abstract-chunk-store
, abstract-blob-store
and abstract-point-store
.
If you have a question or need support using abstract-scheduler
, refer to the issues page.
FAQs
An interface and test suite to implement various scheduling algorithms.
The npm package abstract-scheduler receives a total of 7 weekly downloads. As such, abstract-scheduler popularity was classified as not popular.
We found that abstract-scheduler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.