opurl

Object-oriented URL utility

opurl

URL utility. Work with the path portion of URLs. Expose the same API as opath;

npm install opurl
var Url = require('opurl');
 
var url = new Url('http://example.com/foo/bar?q=search#hash').dirname();
url.toString() === 'http://example.com/foo?q=search#hash';