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

probe-image-size

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

probe-image-size - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

2.0.1 / 2016-07-01
------------------
- Fixed bug in streams cleanup condition.
2.0.0 / 2016-06-25

@@ -2,0 +8,0 @@ ------------------

2

package.json
{
"name": "probe-image-size",
"version": "2.0.0",
"version": "2.0.1",
"description": "Get image size without full download (JPG, GIF, PNG, WebP, BMP, TIFF, PSD)",

@@ -5,0 +5,0 @@ "keywords": [

@@ -11,3 +11,10 @@ probe-image-size

Key features:
- small size, no heavy dependencies
- works with remote and local data
- effective with big images (speed/memory), download minimal data from remotes
- easy to browserify (splitted to components)
Install

@@ -29,3 +36,13 @@ -------

probe('http://example.com/image.jpg', function (err, result) {
console.log(result); // => { width: xx, height: yy, type: 'jpg', mime: 'image/jpeg', wUnits: 'px', hUnits: 'px' }
console.log(result); // =>
/*
{
width: xx,
height: yy,
type: 'jpg',
mime: 'image/jpeg',
wUnits: 'px',
hUnits: 'px'
}
*/
});

@@ -36,3 +53,3 @@

probe({ url: 'http://example.com/image.jpg', timeout: 5000 }, function (err, result) {
console.log(result); // => { width: xx, height: yy, length: zz, type: 'jpg', mime: 'image/jpeg', wUnits: 'px', hUnits: 'px' }
console.log(result);
});

@@ -43,3 +60,3 @@

probe('http://example.com/image.jpg').then(function (result) {
console.log(result); // => { width: xx, height: yy, type: 'jpg', mime: 'image/jpeg', wUnits: 'px', hUnits: 'px' }
console.log(result);
});

@@ -53,3 +70,2 @@

console.log(result);
// => { width: xx, height: yy, type: 'jpg', mime: 'image/jpeg', wUnits: 'px', hUnits: 'px' }

@@ -65,3 +81,3 @@ // terminate input, depends on stream type,

console.log(probe.sync(data)); // => { width: xx, height: yy, type: 'jpg', mime: 'image/jpeg', wUnits: 'px', hUnits: 'px' }
console.log(probe.sync(data));
```

@@ -68,0 +84,0 @@

@@ -36,8 +36,6 @@ 'use strict';

if (strm) {
stream.unpipe(strm);
strm.end();
i = pStreams.indexOf(strm);
if (i) {
stream.unpipe(pStreams[i]);
pStreams[i].end();
pStreams.splice(i, 1);
}
if (i >= 0) pStreams.splice(i, 1);
return;

@@ -44,0 +42,0 @@ }

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