simpleurl
v1.0.2
Published
Removes protocol,top level domain, and hash fragment from urls.
Downloads
3
Readme
simpleurl
Removes protocol, www top level domain, trailing slash, and hash fragment.
Usage
var simpleurl = require('simpleurl');
console.log(simpleurl.getSimpleUrl("https://www.google.com/#hashfrag"));
Why?
How do you compare whether two urls are the same? Don't we view www.google.com as being the same as google.com? or https://google.com? This module removes these extras and creates a unique identifier from a url.
https://google.com https://google.com/ https://google.com/#hashfrag https://www.google.com/#hashfrag
will all be trimmed to:
google.com