elongate

Expand shortened urls.

Elongate -- Expand shortened urls

  npm install -g elongate

Or locally for use as a library:

  npm install elongate

Or from source:

  git clone git://github.com/colinscape/elongate.git 
  cd elongate
  npm link

If you installed it globally:

  $ elongate http://bit.ly/TAA2AL

If installed as a library:

  elongate = require 'elongate'

elongate 'http://bit.ly/TAA2AL', (err, destination_url) -> console.log "Destination log is #{destination_url}"

or for the full redirect chain:

  elongate = require 'elongate'

elongate 'http://bit.ly/TAA2AL', (err, destination_url, all_urls) -> console.log intermediate_url for intermediate_url in all_urls

Or, as JavaScript:

  var elongate = require('elongate')

elongate('http://bit.ly/TAA2AL', function(err, destination_url) { console.log('Destination url is ' + destination_url); });

  var elongate = require('elongate')

elongate('http://bit.ly/TAA2AL', function(err, destination_url, all_urls) { for (var i=0; i < all_urls.length; ++i) { console.log(all_urls[i]);
} });