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

browser-image-size

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-image-size - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

HISTORY.md
1.0.2 / 2015-04-14
==================
* Use object-url to create and revoke url
1.0.1 / 2015-04-14

@@ -3,0 +9,0 @@ ==================

8

lib/index.js
/* istanbul ignore next */
var DOMURL = window.URL || window.webkitURL || window
var DOMURL = require('object-url')

@@ -11,3 +11,3 @@ /**

return new Promise(function (resolve, reject) {
var url = typeof image === 'string' ? image : DOMURL.createObjectURL(image)
var url = typeof image === 'string' ? image : DOMURL.create(image)
if (!url) throw new Error('Must use a valid image')

@@ -18,3 +18,3 @@

if (typeof image !== 'string')
DOMURL.revokeObjectURL(url)
DOMURL.revoke(url)
resolve({width: img.width, height: img.height})

@@ -25,3 +25,3 @@ }

if (typeof image !== 'string')
DOMURL.revokeObjectURL(url)
DOMURL.revoke(url)
reject(err)

@@ -28,0 +28,0 @@ }

{
"name": "browser-image-size",
"version": "1.0.1",
"version": "1.0.2",
"description": "Get image size in the browser",

@@ -35,3 +35,6 @@ "main": "lib/index.js",

"zuul": "^2.1.1"
},
"dependencies": {
"object-url": "^1.0.0"
}
}

Sorry, the diff of this file is not supported yet

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