#isMethod-middleware
add is[req.method] convenience property to every request.
e.g.,
function(req, res, next) {
if (req.isGet) {
req.json('GET request');
}
}
mostly useful for other middleware, rather than routing middleware.
#isMethod-middleware
add is[req.method] convenience property to every request.
e.g.,
function(req, res, next) {
if (req.isGet) {
req.json('GET request');
}
}
mostly useful for other middleware, rather than routing middleware.
npm i ismethod
1
1.0.4
ISC