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

Convert monkey-patching into middleware #13

@niftylettuce

Description

@niftylettuce

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 } ])
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions