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

fs-thumbnail

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fs-thumbnail - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

27

lib/ThumbnailGenerator.js

@@ -69,3 +69,7 @@ /**

this.functionsToTry = [this._trySharp, this._tryFluentFfmpeg];
this.functionsToTry = [
['sharp', (data) => this._trySharp(data)],
['ffmpeg 5%', (data) => this._tryFluentFfmpeg(data, '5%')],
['ffmpeg raw', (data) => this._tryFluentFfmpeg(data)],
];
}

@@ -114,5 +118,6 @@

* @param {number} data.quality
* @param {string} [timestamp]
* @private
*/
_tryFluentFfmpeg(data) {
_tryFluentFfmpeg(data, timestamp = null) {
const p = data.path;

@@ -128,11 +133,13 @@ const o = data.output;

const screenshotOpts = {
filename: outData.base,
folder: outData.dir,
size: size,
};
if (timestamp) screenshotOpts.timestamps = [timestamp],
ffmpeg(p)
.on('error', error => reject(error))
.on('end', () => resolve(o))
.screenshots({
timestamps: ['6%'],
filename: outData.base,
folder: outData.dir,
size: size,
});
.screenshots(screenshotOpts);
} catch (error) {

@@ -170,4 +177,4 @@ reject(error);

for (let i = 0; i < this.functionsToTry.length; ++i) {
const func = this.functionsToTry[i];
const name = func.name;
const name = this.functionsToTry[i][0];
const func = this.functionsToTry[i][1];

@@ -174,0 +181,0 @@ currPromise = currPromise

{
"name": "fs-thumbnail",
"version": "1.0.8",
"version": "1.0.9",
"description": "Library for generation of thumbnails based on file system paths.",

@@ -5,0 +5,0 @@ "main": "index.js",

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