Socket
Socket
Sign inDemoInstall

sharp

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharp - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

7

index.js

@@ -56,2 +56,9 @@ var sharp = require("./build/Release/sharp");

module.exports.cache = function(limit) {
if (Number.isNaN(limit)) {
limit = null;
}
return sharp.cache(limit);
}
/* Deprecated v0.0.x methods */

@@ -58,0 +65,0 @@ module.exports.crop = function(input, output, width, height, sharpen, callback) {

2

package.json
{
"name": "sharp",
"version": "0.1.6",
"version": "0.1.7",
"author": "Lovell Fuller",

@@ -5,0 +5,0 @@ "description": "High performance module to resize JPEG, PNG, WebP and TIFF images using the libvips image processing library",

@@ -54,3 +54,3 @@ # sharp

### Examples
#### Examples

@@ -105,2 +105,16 @@ ```javascript

### cache([limit])
If `limit` is provided, set the `vips` internal cache limit to this value in MB. The default value is 100.
Always returns cache statistics, namely current usage, high water mark and maximum limit.
The high water mark may be higher than the maximum limit.
```javascript
var stats = sharp.cache(); // { current: 98, high: 115, limit: 100 }
sharp.cache(200); // { current: 98, high: 115, limit: 200 }
sharp.cache(50); // { current: 49, high: 115, limit: 50 }
```
## Testing

@@ -107,0 +121,0 @@

@@ -29,2 +29,4 @@ var sharp = require("../index");

);
}, function() {});
}, function() {
console.dir(sharp.cache());
});

@@ -423,2 +423,3 @@ var sharp = require("../index");

});
console.dir(sharp.cache());
});

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