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

image-size

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-size - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

7

dist/index.js

@@ -54,2 +54,3 @@ "use strict";

if (size <= 0) {
yield handle.close();
throw new Error('Empty file');

@@ -73,3 +74,7 @@ }

const descriptor = fs.openSync(filepath, 'r');
const size = fs.fstatSync(descriptor).size;
const { size } = fs.fstatSync(descriptor);
if (size <= 0) {
fs.closeSync(descriptor);
throw new Error('Empty file');
}
const bufferSize = Math.min(size, MaxBufferSize);

@@ -76,0 +81,0 @@ const buffer = Buffer.alloc(bufferSize);

24

package.json
{
"name": "image-size",
"version": "0.9.1",
"version": "0.9.2",
"description": "get dimensions of any image file",

@@ -20,3 +20,2 @@ "main": "dist/index.js",

"test": "nyc mocha",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"clean": "rm -rf dist docs",

@@ -50,19 +49,18 @@ "generate-docs": "typedoc",

"devDependencies": {
"@types/chai": "4.2.12",
"@types/chai": "4.2.14",
"@types/glob": "7.1.3",
"@types/mocha": "8.0.3",
"@types/node": "14.6.3",
"@types/sinon": "9.0.5",
"@typescript-eslint/eslint-plugin": "4.0.1",
"@typescript-eslint/parser": "4.0.1",
"@types/node": "14.11.10",
"@types/sinon": "9.0.8",
"@typescript-eslint/eslint-plugin": "4.4.1",
"@typescript-eslint/parser": "4.4.1",
"chai": "4.2.0",
"coveralls": "3.1.0",
"eslint": "7.8.1",
"eslint": "7.11.0",
"glob": "7.1.6",
"mocha": "8.1.3",
"mocha": "8.2.0",
"nyc": "15.1.0",
"sinon": "9.0.3",
"sinon": "9.2.0",
"ts-node": "9.0.0",
"typedoc": "0.19.0",
"typescript": "4.0.2"
"typedoc": "0.19.2",
"typescript": "4.0.3"
},

@@ -69,0 +67,0 @@ "dependencies": {

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