express-optimized icon indicating copy to clipboard operation
express-optimized copied to clipboard

refactors

Open jonathanong opened this issue 11 years ago • 2 comments

not totally sure why you inlined all this stuff. here's just a list of stuff we can refactor out to modules "we" own. :

  • list of methods - https://github.com/visionmedia/node-methods
  • params - https://github.com/expressjs/path-match/blob/master/index.js
  • querystring - https://github.com/visionmedia/node-querystring or something new
  • path-join

jonathanong avatar Jul 07 '14 05:07 jonathanong

  • node-methods: it's just exporting a small array, so it's not a big deal. IMHO it's worth not pulling in another dependency just for that. shrug
  • path-match: one of my beefs with this was that decodeParam throws. I decided to return false instead and use the original string as the value to avoid a try-catch in the calling function and using the original string value seemed sensible.
  • node-querystring: I haven't looked at that. I guess the major thing with that is that it supports parsing nested params..

mscdex avatar Jul 07 '14 05:07 mscdex

yeah we can change that in path-match. don't really care about that

jonathanong avatar Jul 07 '14 05:07 jonathanong