omit parts of a url for friendlier display
It's like @sindresorhus's truncate-url,
but without requiring the url and querystring modules in the browser. It's also
similar to @williambelle's crop-url,
which is very lightweight, but it cuts off the
and I want to keep it.
This one cuts away pieces from the URL's path and query string until it fits:
npm install shorten-url
var shortenUrl =
url is the input URL.
maxLength is the maximum length of the URL.