New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

image-promise

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-promise - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

13

dist/image-promise.common-js.js

@@ -31,9 +31,12 @@ 'use strict';

load.unload = function (src) {
return (loaded[src] || Promise.resolve({})).then(function (image) {
// GC, http://www.fngtps.com/2010/mobile-safari-image-resource-limit-workaround/
image.src = EMPTY_IMAGE;
delete loaded[src];
});
if (loaded[src]) {
loaded[src].then(function (image) {
// GC, http://www.fngtps.com/2010/mobile-safari-image-resource-limit-workaround/
image.src = EMPTY_IMAGE;
delete loaded[src];
});
}
return Promise.resolve();
};
module.exports = load;

@@ -29,9 +29,12 @@ // let images = ['a.jpg','b.jpg'];

load.unload = function (src) {
return (loaded[src] || Promise.resolve({})).then(function (image) {
// GC, http://www.fngtps.com/2010/mobile-safari-image-resource-limit-workaround/
image.src = EMPTY_IMAGE;
delete loaded[src];
});
if (loaded[src]) {
loaded[src].then(function (image) {
// GC, http://www.fngtps.com/2010/mobile-safari-image-resource-limit-workaround/
image.src = EMPTY_IMAGE;
delete loaded[src];
});
}
return Promise.resolve();
};
export default load;
{
"name": "image-promise",
"version": "1.0.3",
"version": "1.0.4",
"description": "Load an image and return a promise in the browser, in 0.4KB",

@@ -5,0 +5,0 @@ "license": "MIT",

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