
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
An Event Emitter based timer with return arguments
npm install wait-a-bit -save
var waitABit = require('wait-a-bit');
var timer = new waitABit();
timer.set(2000); //milliseconds
timer.on('expire',function(returnArguments){
console.log('Ended', returnArguments);
//anything passed into timer.start() will be called back here;
});
var sendObject = {hello: 'world',this: 'is-me'}
timer.start(sendObject);
//if you want to stop a timer once started use the timer.clear() method.
var timer = new waitABit();
Takes milliseconds as an argument, does not initiate the timer;
timer.set(milliseconds);
Takes any number of arguments and passes it back via the 'expired' event after the milliseconds of SET has expired.
timer.start([object],[string],[int],[array]);
Resets the timer and does not emit the 'expired' event
timer.clear();
You can listen for the start event if you need to know exactly when the timer started counting down;
timer.on('start',function(){
console.log('timer started')
});
You can listen for the clear event if you need to execute code after a timer has been cleared.
timer.on('clear',function(){
console.log('timer cleared')
});
You cal listen for the end event if you need to execute code after a timer has expired.
timer.on('expired',function(args){
console.log('timer expired with arguments returned:',args);
});
FAQs
An Event emitter based timer with argument returns
We found that wait-a-bit 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.