Express: How come only bodyParser.json is exposed?

Created on 19 Jun 2018  路  2Comments  路  Source: expressjs/express

This module depends on body-parser and exposes bodyParser.json. However, if someone wanted to get the pure text result of the output, or use another method from body-parser, they'd have to install it themselves. Why not just expose all of the functions and save the user an extra install? Or not expose anything, and make the module lighter?

question

Most helpful comment

I think the general idea was to remove all these originally, but the json one was brought back. I looked quickly for the old conversations but it was too long ago for me to remember what to look for.

I do think, if the choice is to include any, then all should be exposed. But maybe there was some question about this someone else would remember better.

All 2 comments

I think the general idea was to remove all these originally, but the json one was brought back. I looked quickly for the old conversations but it was too long ago for me to remember what to look for.

I do think, if the choice is to include any, then all should be exposed. But maybe there was some question about this someone else would remember better.

The others are being exposed in Express 4.17. Follow the release and what it includes in #3778

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Domiii picture Domiii  路  3Comments

extensionsapp picture extensionsapp  路  3Comments

cuni0716 picture cuni0716  路  3Comments

jefflage picture jefflage  路  4Comments

snowdream picture snowdream  路  3Comments