Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
scheduler
Advanced tools
Cooperative scheduler for the browser environment.
The scheduler package is a lightweight coordination module that allows for scheduling work with different priorities. It is used by React internally for its own scheduling of updates, and it can be used in other contexts to manage tasks with various levels of urgency.
Immediate Priority Scheduling
Schedules a task to be performed with the highest priority, effectively running it as soon as possible.
import { unstable_scheduleCallback, unstable_ImmediatePriority } from 'scheduler';
unstable_scheduleCallback(unstable_ImmediatePriority, () => {
console.log('Run this task immediately');
});
User Blocking Priority Scheduling
Schedules a task with a priority level that is high but not as immediate, suitable for tasks that must respond to user input, like input handlers.
import { unstable_scheduleCallback, unstable_UserBlockingPriority } from 'scheduler';
unstable_scheduleCallback(unstable_UserBlockingPriority, () => {
console.log('Run this task with user-blocking priority');
});
Normal Priority Scheduling
Schedules a task with a normal priority, which is suitable for tasks that do not need to be run immediately or in response to direct user input.
import { unstable_scheduleCallback, unstable_NormalPriority } from 'scheduler';
unstable_scheduleCallback(unstable_NormalPriority, () => {
console.log('Run this task with normal priority');
});
Idle Priority Scheduling
Schedules a task with the lowest priority, which will run when the browser is idle, suitable for background and low priority tasks.
import { unstable_scheduleCallback, unstable_IdlePriority } from 'scheduler';
unstable_scheduleCallback(unstable_IdlePriority, () => {
console.log('Run this task when the browser is idle');
});
A cron-like and not-cron-like job scheduler for Node.js. It allows scheduling using cron syntax as well as more flexible date-based scheduling, unlike the scheduler package which is more about prioritizing task execution.
A light and flexible job scheduling library for Node.js that uses MongoDB for persisting job data. It's more feature-rich for job scheduling with persistence, compared to the in-memory scheduling approach of the scheduler package.
A Redis-based queue system for handling distributed jobs and messages in Node.js. It's more suitable for distributed systems and offers features like rate limiting, which are not present in the scheduler package.
A library for describing recurring schedules and calculating their occurrences. It provides a more human-readable way of scheduling tasks, unlike the scheduler package which focuses on task prioritization rather than recurrence patterns.
scheduler
This is a package for cooperative scheduling in a browser environment. It is currently used internally by React, but we plan to make it more generic.
The public API for this package is not yet finalized.
The React team thanks Anton Podviaznikov for donating the scheduler
package name.
FAQs
Cooperative scheduler for the browser environment.
The npm package scheduler receives a total of 24,871,080 weekly downloads. As such, scheduler popularity was classified as popular.
We found that scheduler demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.