is-url-http
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -0,1 +1,12 @@ | ||
<a name="1.0.1"></a> | ||
## 1.0.1 (2018-09-17) | ||
* Add more cases ([e1496f1](https://github.com/Kikobeats/is-url-http/commit/e1496f1)), closes [#1](https://github.com/Kikobeats/is-url-http/issues/1) | ||
* Update package.json ([cb6d17b](https://github.com/Kikobeats/is-url-http/commit/cb6d17b)) | ||
* Update README.md ([6df4758](https://github.com/Kikobeats/is-url-http/commit/6df4758)) | ||
* docs(readme): add Greenkeeper badge ([fcf3a95](https://github.com/Kikobeats/is-url-http/commit/fcf3a95)) | ||
* chore(package): update dependencies ([be421d5](https://github.com/Kikobeats/is-url-http/commit/be421d5)) | ||
<a name="1.0.0"></a> | ||
@@ -2,0 +13,0 @@ # 1.0.0 (2018-09-17) |
@@ -5,7 +5,7 @@ 'use strict' | ||
const REGEX_HTTP_PROTOCOL = /https?/i | ||
const REGEX_HTTP_PROTOCOL = /^https?:\/\//i | ||
module.exports = url => { | ||
try { | ||
return REGEX_HTTP_PROTOCOL.test(new URL(url).protocol) | ||
return new URL(url) && REGEX_HTTP_PROTOCOL.test(url) | ||
} catch (err) { | ||
@@ -12,0 +12,0 @@ return false |
@@ -5,3 +5,3 @@ { | ||
"homepage": "https://documentup.com/Kikobeats/is-url-http", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "index.js", | ||
@@ -8,0 +8,0 @@ "author": { |
5438