Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-image-url

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-image-url - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

10

index.js

@@ -9,7 +9,11 @@ var request = require('sync-request');

if (!isUrl(url)) return isImage(url);
var http = url.lastIndexOf('http');
if (http == -1) return false;
url = url.substring(http);
var pathname = urlParse(url).pathname;
if (!pathname) return false;
if (isImage(pathname.split(':')[0])) {
return true;
}
var last = pathname.search(/[:?&]/);
if (last != -1)
pathname = pathname.substring(0, last);
if (isImage(pathname)) return true;
try {

@@ -16,0 +20,0 @@ if (!accurate) return false;

{
"name": "is-image-url",
"version": "1.1.2",
"version": "1.1.3",
"description": "Check if a url is an image",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc