Skip to content
This repository has been archived by the owner on Jan 9, 2018. It is now read-only.

Convert monkey-patching into middleware #13

Open
niftylettuce opened this issue Jun 14, 2014 · 0 comments
Open

Convert monkey-patching into middleware #13

niftylettuce opened this issue Jun 14, 2014 · 0 comments

Comments

@niftylettuce
Copy link

It'd be great to have this as middleware which would add to res object the csv method.

For example:

var expressCsv = require('express-csv')

// ...

app.use(expressCsv)

// ... or only apply it to some routes ...

app.get('/some-route', expressCsv, function(req, res, next) {
  res.csv([ { a: 1, b: 2 } ])
})
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant