
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
setinterval
Advanced tools
[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url]
More reasonable setInterval for async task.
$ npm i setinterval
const Timer = require('setinterval');
const t = new Timer(function*() {
const user = yield db.User.get(id);
console.log(user);
}, 1000);
// start timer
t.setInterval();
// xxxx
t.clearInterval();
fn should be a Promise, a generator function or a thunk.
cancel timer.
Triggered each time fn is finished, whenever a error is thrown. You can cancel the timer in this event. A count
parameter is passed in the event handler which stands for how many times fn has been called.
timer.on('tick', count => {
timer.clearInterval();
});
Triggered when error thrown from fn.
timer.on('error', e => {
logger.info(e.stack);
});
MIT
FAQs
[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url]
We found that setinterval demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.