
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
express-dot-async
Advanced tools
Have you always wanted to use Express with Promises like a boss?
Usually you have to do things like this:
app.get('/api/songs', (req, res) => {
database.find('songs')
.then(songs => res.json(songs))
.catch(e => res.status(500).send(e.message))
})
But with express-dot-async you can do it this way:
app.async.get('/api/songs', () => database.find('songs'))
express-dot-async contains special HttpError which enable this kind of stuff:
import { HttpError } from 'express-dot-async'
function doStuff(opts) {
if (!opts.mandatory) {
throw new HttpError({status: 400, message: 'Mandatory is mandatory!'})
}
}
import express from 'express'
import asyncify, { HttpError } from 'express-dot-async'
const app = express()
app.async = asyncify(app)
const getData = (error) => {
if (error) {
throw new HttpError({status: 400, message: 'help ducks'})
}
return new Promise(resolve => resolve(['ducks', 'dogs', 'cats']))
}
app.async.get('/api/songs', (req) => getData(req.query.error === 'true'))
app.listen(6505)
FAQs
Use Promises with Express like a boss!
We found that express-dot-async 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 Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.