1.1.2 • Published 10 years ago

simple-realurl v1.1.2

Weekly downloads
13
License
MIT
Repository
github
Last release
10 years ago

simple-realurl

NPM Build Status JavaScript Style Guide

A simple node module to convert short url's to the original url.

Based off Manuel van Rijn's original realurl, I created this to remove some dependencies (copypaste) and any global bin files.

Getting Started

Install the module with: npm install simple-realurl --save

Within your NodeJS project

var realurl = require('simple-realurl');
realurl.get('http://goo.gl/BGV9x', function(error, result) {
   // error = null;
   // result = "http://github.com/manuelvanrijn/node-realurl";
});

realurl.get('http://this-is-not-a-real-url.com/at-all', function(error, result) {
   // error = Error('URL resulted in a 404');
   // result = null;
});

realurl.get('', function(error, result) {
   // error = Error('Please specify a short url');
   // result = null;
});

realurl.get('url', {agent: false}, function(error, result) {
  // bypasses Node's http/s client pool
});

License

Copyright (c) 2012 Manuel van Rijn - Licensed under the MIT license. Copyright (c) 2012-2016 Luke Karrys - Licensed under the MIT license.

1.1.2

10 years ago

1.1.1

11 years ago

1.1.0

11 years ago

1.0.3

11 years ago

1.0.1

11 years ago

1.0.0

12 years ago

0.1.5

12 years ago

0.1.4

13 years ago