
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@stream-io/worker-timer
Advanced tools
A Worker based implementation of the JS Timers API.
// import the library
import { WorkerTimer } from "@stream-io/worker-timer";
// create an instance
const timer = new WorkerTimer();
// with interval
const id = timer.setInterval(() => {
console.log("Hello World from interval");
}, 1000);
// clear the interval
timer.clearInterval(id);
// with timeout
timer.setTimeout(() => {
console.log("Hello World from timeout");
}, 1000);
// clear the timeout
timer.clearTimeout(id);
You can also create a WorkerTimer instance with custom defaults:
const timer = new WorkerTimer({
useWorker: false, // will fallback the Platform API
name: "custom-timer", // name of the worker, for debugging purposes
});
FAQs
Worker based timers for Stream.io JS-based SDKs and applications
The npm package @stream-io/worker-timer receives a total of 26,114 weekly downloads. As such, @stream-io/worker-timer popularity was classified as popular.
We found that @stream-io/worker-timer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.