I think it would make our development process faster, our code cleaner if we can do this:
app.use([
bodyParser.json(),
bodyParser.urlencoded({ extended: true }),
expressValidator(),
passport.initialize(),
passport.session()
]);
Instead of
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use(expressValidator());
app.use(passport.initialize());
app.use(passport.session());
What do you think?
I couldn't agree more, which is why we already allow that :) Here is a test for that feature: https://github.com/expressjs/express/blob/master/test/app.use.js#L170-L196
Most helpful comment
I couldn't agree more, which is why we already allow that :) Here is a test for that feature: https://github.com/expressjs/express/blob/master/test/app.use.js#L170-L196