Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

andris9/resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resolver

Url resolver module for Node.JS

This module Resolves destination URLs. Feed it a source url and the resolver returns with the destination url if any redirects happened.

For example

http://bit.ly/PWoeXs

will be resolved into

http://www.andrisreinman.com/post/15668406504/eesti-saitide-kodeeringud

Also if the final url has google analytics params (utm_), these will be removed.

Installation

npm install resolver

Usage

Use resolver.resolve(url, callback)

var resolver = require("resolver");

resolver.resolve("http://bit.ly/PWoeXs", function(err, url, filename, contentType){
    console.log(err || url);
});

License

MIT

About

Resolve URLs with node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published