normalize-file-to-url-path
A simple function to normalize a file path into a URL path that can be used when testing req.url
from an HTTP server.
var toUrl = //=> 'foo.js' //=> 'foo%20bar.js' //=> null
Experimental -- mostly used internally across some of my tools.
License
MIT, see LICENSE.md for details.