
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.
ES6 ready sleep function, provides generator and promise.
To install:
npm install es6-sleep
Now that async/await is becoming more popular, I've updated this module to provide both legacy (generator) functionality, along with a promise too. If you're updating to 2.X from 1.X, all you need to change is:
var sleep = require('es6-sleep');
to
var sleep = require('es6-sleep').generator;
To use the generator, say within a co runner, or within Koa middleware:
const sleep = require('es6-sleep').generator;
app.use(function *() {
// do something
yield sleep(1000);
// continue
});
To use the promise, let's say with async/await:
const sleep = require('es6-sleep').promise;
(async function () {
// do something
await sleep(1000);
// continue
})();
MIT
If you have any issues with the 2.X upgrade, please pop it in a GitHub issue or submit a PR and I'll get to it ASAP.
FAQs
ES6 ready sleep function, provides generator and promise
The npm package es6-sleep receives a total of 200 weekly downloads. As such, es6-sleep popularity was classified as not popular.
We found that es6-sleep 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.