ismethod

1.0.4 • Public • Published

#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.

Readme

Keywords

none

Package Sidebar

Install

npm i ismethod

Weekly Downloads

0

Version

1.0.4

License

ISC

Last publish

Collaborators

  • ergusto