1.0.2 • Published 9 years ago

simpleurl v1.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

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

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago