Node v7.1.0.
I parsed a url with the require('url') module using .parse and ran into a gotcha.
I had path.join('vendor', url.pathname, url.search) and it errored because .search was null.
I had assumed it followed the browser behavior of returning an empty string when no search query is found.
Node v7.1.0.
I parsed a url with the
require('url')module using.parseand ran into a gotcha.I had
path.join('vendor', url.pathname, url.search)and it errored because.searchwasnull.I had assumed it followed the browser behavior of returning an empty string when no search query is found.