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

imagemin-mozjpeg

Package Overview
Dependencies
Maintainers
7
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imagemin-mozjpeg - npm Package Compare versions

Comparing version 9.0.0 to 10.0.0

16

index.js

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

'use strict';
const execa = require('execa');
const isJpg = require('is-jpg');
const mozjpeg = require('mozjpeg');
import {Buffer} from 'node:buffer';
import {execa} from 'execa';
import isJpg from 'is-jpg';
import mozjpeg from 'mozjpeg';
module.exports = options => async buffer => {
const imageminMozjpeg = options => async buffer => {
options = {

@@ -11,3 +11,3 @@ trellis: true,

overshoot: true,
...options
...options,
};

@@ -113,3 +113,3 @@

input: buffer,
maxBuffer: Infinity
maxBuffer: Number.POSITIVE_INFINITY,
});

@@ -119,1 +119,3 @@

};
export default imageminMozjpeg;
{
"name": "imagemin-mozjpeg",
"version": "9.0.0",
"version": "10.0.0",
"description": "Imagemin plugin for mozjpeg",
"license": "MIT",
"repository": "imagemin/imagemin-mozjpeg",
"type": "module",
"exports": "./index.js",
"author": {

@@ -24,3 +26,3 @@ "name": "Kevin Mårtensson",

"engines": {
"node": ">=10"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},

@@ -45,11 +47,11 @@ "scripts": {

"dependencies": {
"execa": "^4.0.0",
"is-jpg": "^2.0.0",
"mozjpeg": "^7.0.0"
"execa": "^6.0.0",
"is-jpg": "^3.0.0",
"mozjpeg": "^8.0.0"
},
"devDependencies": {
"ava": "^3.8.0",
"ava": "^3.15.0",
"is-progressive": "^3.0.0",
"xo": "^0.30.0"
"xo": "^0.47.0"
}
}

@@ -1,6 +0,5 @@

# imagemin-mozjpeg [![Build Status](https://travis-ci.org/imagemin/imagemin-mozjpeg.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-mozjpeg)
# imagemin-mozjpeg
> [Imagemin](https://github.com/imagemin/imagemin) plugin for [mozjpeg](https://github.com/mozilla/mozjpeg)
## Install

@@ -12,12 +11,12 @@

## Usage
```js
const imagemin = require('imagemin');
const imageminMozjpeg = require('imagemin-mozjpeg');
import imagemin from 'imagemin';
import imageminMozjpeg from 'imagemin-mozjpeg';
(async () => {
await imagemin(['images/*.jpg'], 'build/images', {
use: [
await imagemin(['images/*.jpg'], {
destination: 'build/images',
plugins: [
imageminMozjpeg()

@@ -31,6 +30,5 @@ ]

## API
### imageminMozjpeg([options])(buffer)
### imageminMozjpeg(options?)(buffer)

@@ -41,2 +39,4 @@ Returns a `Promise<Buffer>`.

Type: `object`
##### quality

@@ -50,3 +50,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -58,3 +58,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `false`

@@ -66,3 +66,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `false`

@@ -74,3 +74,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `false`

@@ -82,3 +82,3 @@

Type: `number`<br>
Type: `number`\
Default: `1`

@@ -94,3 +94,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -102,3 +102,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -110,3 +110,3 @@

Type: `string`<br>
Type: `string`\
Default: `hvs-psnr`

@@ -118,3 +118,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `true`

@@ -126,3 +126,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `false`

@@ -134,3 +134,3 @@

Type: `string`<br>
Type: `string`\
Default: `int`

@@ -146,3 +146,3 @@

Type: `boolean`<br>
Type: `boolean`\
Default: `false`

@@ -188,6 +188,1 @@

Buffer to optimize.
## License
MIT © [Imagemin](https://github.com/imagemin)
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