image-size
Advanced tools
Comparing version 1.0.2 to 2.0.0-alpha.1
{ | ||
"name": "image-size", | ||
"version": "1.0.2", | ||
"version": "2.0.0-alpha.1", | ||
"description": "get dimensions of any image file", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"type": "module", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
"types": "dist/dts/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/esm/index.js", | ||
"require": "./dist/cjs/index.js" | ||
} | ||
}, | ||
"files": [ | ||
@@ -12,3 +20,3 @@ "dist", | ||
"engines": { | ||
"node": ">=14.0.0" | ||
"node": ">=16.18.0" | ||
}, | ||
@@ -21,4 +29,4 @@ "bin": "bin/image-size.js", | ||
"generate-docs": "typedoc", | ||
"build": "tsc", | ||
"prepack": "yarn clean && yarn build" | ||
"build": "tsc && tsc -p tsconfig.esm.json", | ||
"prepack": "yarn build" | ||
}, | ||
@@ -25,0 +33,0 @@ "keywords": [ |
@@ -58,3 +58,3 @@ # image-size | ||
NOTE: The asynchronous version doesn't work if the input is a Buffer. Use synchronous version instead. | ||
NOTE: The asynchronous version doesn't work if the input is a Uint8Array. Use synchronous version instead. | ||
@@ -124,4 +124,4 @@ Also, the asynchronous functions have a default concurrency limit of **100** | ||
}).on('end', function() { | ||
const buffer = Buffer.concat(chunks) | ||
console.log(sizeOf(buffer)) | ||
const input = Buffer.concat(chunks) | ||
console.log(sizeOf(input)) | ||
}) | ||
@@ -131,3 +131,3 @@ }) | ||
You can optionally check the buffer lengths & stop downloading the image after a few kilobytes. | ||
You can optionally check the buffer length & stop downloading the image after a few kilobytes. | ||
**You don't need to download the entire image** | ||
@@ -175,10 +175,3 @@ | ||
## Hosted API | ||
We also provide a hosted API for image-size which may simplify your use case. | ||
<a href="https://image-size.saasify.sh"> | ||
<img src="https://badges.saasify.sh?text=View%20Hosted%20API" height="40"/> | ||
</a> | ||
## Credits | ||
@@ -185,0 +178,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
81475
69
2139
Yes
1
179
5
1