node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป



This a very simple node.js module for comparing URLs it has two function normalise and isEqual

Using it as a Module

var urlTools = require('url-tools'),
    options = {
        lowercase: true,
        removeWWW: true,
        removeTrailingSlash: true,
        forceTrailingSlash: false,
        removeSearch: true,
        removeHash: true,
        removeHashbang: true,
        removeProtocol: true

normalize = urlTools.normalize('', options);
// normalize would equal: ''

isequal = urlTools.isEqual('',, options );
// isequal would equal:  true