deshortify
Advanced tools
Comparing version 0.2.0 to 0.2.2
# v0.2.1 (2017-06-20) | ||
* Work around schema-less URLs | ||
# v0.2.0 (2017-06-19) | ||
* Add linting | ||
* Couple more parameter cleaners | ||
# v0.1.2 (2017-05-15) | ||
@@ -3,0 +12,0 @@ |
{ | ||
"name": "deshortify", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"description": "Turns short URLs into long, meaningful, crap-less URLs.", | ||
@@ -15,2 +15,6 @@ "main": "src/deshortify.js", | ||
], | ||
"scripts": { | ||
"lint": "eslint src", | ||
"lintfix": "eslint src --fix" | ||
}, | ||
"devDependencies": { | ||
@@ -17,0 +21,0 @@ "eslint": "^4.0.0" |
@@ -33,2 +33,8 @@ | ||
deshortify(url) { | ||
// Try parsing it, to catch URLs without schema. | ||
let parsedUrl = parseUrl(url); | ||
if (!parsedUrl.protocol) { | ||
url = 'http://' + url; | ||
} | ||
return this._deshortify(url); | ||
@@ -35,0 +41,0 @@ } |
237
12865
6