How to Parse a URL into Hostname and Path in JavaScript

Published --