is-image-url
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -5,3 +5,6 @@ var urlParse = require('url').parse; | ||
module.exports = function (url) { | ||
return url ? isImage(urlParse(url).pathname.split(':')[0]) : false; | ||
if (!url) return false; | ||
var pathname = urlParse(url).pathname; | ||
if (!pathname) return false; | ||
return isImage(pathname.split(':')[0]); | ||
}; |
{ | ||
"name": "is-image-url", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Check if a url is an image", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
3738
7