
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.
@ezy/coerce-middleware
Advanced tools
coerce req.query, req.params or req.body
Validation logic become simpler when it's possible to expect "typed" datas, but datas parsed from url like req.query or req.params are strings.
npm i @ezy/coerce-middleware
import { coerce } from '@ezy/coerce-middleware';
import express from 'express';
const app = express();
app.use(coerce('query'));
app.get('/', (req, res) => {
res.send(JSON.stringify(req.query));
});
app.listen(3000);
// GET /?id=30&is_admin=true&name=awesome%20title
// => {
// name: 'awesome title',
// id: 30,
// is_admin: true
// }
import { coerce } from '@ezy/coerce-middleware';
import express from 'express';
const app = express();
app.use(coerce('query', value => '(^^)'));
app.get('/', (req, res) => {
res.send(JSON.stringify(req.query));
});
app.listen(3000);
// GET /?id=30&is_admin=true&nested[name]=awesome%20title
// => {
// nested: {
// name: '(^^)'
// },
// id: '(^^)',
// is_admin: '(^^)'
// }
FAQs
coerce any property in req object
We found that @ezy/coerce-middleware 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.