From 6267ea592d491eed1853008985bd32f0f2ac459b Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Tue, 31 Oct 2017 14:11:01 +0100 Subject: [PATCH] feat: Allow running from file:// and ftp(s):// --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 02f7229..68dca64 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -1,5 +1,5 @@ module.exports.parseUrl = function parseUrl(url) { - if (url.substr(0,4) !== 'http') { + if (!/[a-z]+:\/\//.test(url)) { return 'http://' + url; } return url;