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

responsive-loader

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

responsive-loader - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

12

index.js

@@ -74,7 +74,13 @@ /* eslint-disable */

var q = queue();
var widthsToGenerate = new Set();
(Array.isArray(sizes) ? sizes : [sizes]).forEach(function(size) {
var width = Math.min(img.bitmap.width, parseInt(size, 10));
q.defer(resizeImage, width);
// Only resize images if they aren't an exact copy of one already being resized...
if (!widthsToGenerate.has(width)) {
widthsToGenerate.add(width);
q.defer(resizeImage, width);
}
});

@@ -92,3 +98,3 @@

var firstImagePath = files[0].path;
loaderCallback(null, 'module.exports = {srcSet:' + srcset + ',images:[' + images + '],src:' + firstImagePath + ',toString:function(){return ' + firstImagePath + '}};');

@@ -95,0 +101,0 @@ });

{
"name": "responsive-loader",
"version": "0.5.0",
"version": "0.5.1",
"description": "A webpack loader for responsive images",

@@ -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