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

jpeg-autorotate

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jpeg-autorotate - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

10

package.json
{
"name": "jpeg-autorotate",
"version": "7.1.0",
"version": "7.1.1",
"description": "Rotates JPEG images based on EXIF orientation",

@@ -11,3 +11,4 @@ "author": "Johan Satgé",

"checkstyle": "eslint .",
"test": "mocha test/*.spec.js"
"test": "nyc --reporter=text mocha test/*.spec.js && rm -r .nyc_output",
"test-ci": "nyc --reporter=lcov mocha test/*.spec.js && codecov"
},

@@ -46,8 +47,7 @@ "files": [

"chai": "^4.1.2",
"codecov": "^3.8.0",
"eslint": "^7.9.0",
"eslint-plugin-prettier": "^3.1.4",
"fs-extra": "^9.0.1",
"mocha": "^8.1.3",
"pixelmatch": "^5.2.1",
"pngjs": "^5.0.0",
"nyc": "^15.1.0",
"prettier": "^2.1.2"

@@ -54,0 +54,0 @@ },

![Version](https://img.shields.io/npm/v/jpeg-autorotate.svg)
![Downloads](https://img.shields.io/npm/dm/jpeg-autorotate.svg)
![Last commit](https://badgen.net/github/last-commit/johansatge/jpeg-autorotate)
[![Build Status](https://travis-ci.org/johansatge/jpeg-autorotate.svg?branch=master)](https://travis-ci.org/johansatge/jpeg-autorotate)
![Downloads](https://img.shields.io/npm/dm/jpeg-autorotate.svg)
![Coverage](https://badgen.net/codecov/c/github/johansatge/jpeg-autorotate)
[![Install size](https://badgen.net/packagephobia/install/jpeg-autorotate)](https://packagephobia.com/result?p=jpeg-autorotate)
![Last commit](https://badgen.net/github/last-commit/johansatge/jpeg-autorotate)

@@ -195,2 +196,3 @@ ![Icon](icon.png)

| --- | --- | --- |
| `7.1.1` | 2020-10-11 | Introduce code coverage<br>Fix an error if `options` are not passed |
| `7.1.0` | 2020-10-10 | Introduce `jpegjsMaxResolutionInMP` & `jpegjsMaxMemoryUsageInMB` options (#26) |

@@ -232,4 +234,1 @@ | `7.0.0` | 2020-09-19 | Don't publish test and linting files on NPM |

* [prettier](https://prettier.io/)
* [fs-extra](https://github.com/jprichardson/node-fs-extra/)
* [pixelmatch](https://github.com/mapbox/pixelmatch)
* [pngjs](https://github.com/lukeapage/pngjs)

@@ -46,6 +46,2 @@ #!/usr/bin/env node

})
.catch((error) => {
console.log(error.message)
process.exit(1)
})

@@ -52,0 +48,0 @@ function listFiles() {

@@ -21,13 +21,25 @@ const CustomError = require('./customerror.js')

*/
m.rotate = function (pathOrBuffer, options, callback) {
m.rotate = function (pathOrBuffer, opts, callback) {
const hasCallback = typeof callback === 'function'
const quality =
typeof options.quality === 'number' && options.quality > 0 && options.quality <= 100 ? options.quality : 100
typeof opts === 'object' &&
opts !== null &&
typeof opts.quality === 'number' &&
opts.quality > 0 &&
opts.quality <= 100
? opts.quality
: 100
const maxResolutionInMP =
typeof options.jpegjsMaxResolutionInMP === 'number' && options.jpegjsMaxResolutionInMP > 0
? options.jpegjsMaxResolutionInMP
typeof opts === 'object' &&
opts !== null &&
typeof opts.jpegjsMaxResolutionInMP === 'number' &&
opts.jpegjsMaxResolutionInMP > 0
? opts.jpegjsMaxResolutionInMP
: null
const maxMemoryUsageInMB =
typeof options.jpegjsMaxMemoryUsageInMB === 'number' && options.jpegjsMaxMemoryUsageInMB > 0
? options.jpegjsMaxMemoryUsageInMB
typeof opts === 'object' &&
opts !== null &&
typeof opts.jpegjsMaxMemoryUsageInMB === 'number' &&
opts.jpegjsMaxMemoryUsageInMB > 0
? opts.jpegjsMaxMemoryUsageInMB
: null

@@ -34,0 +46,0 @@ const promise = readBuffer(pathOrBuffer)

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