Socket
Socket
Sign inDemoInstall

rightimage

Package Overview
Dependencies
256
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.1 to 0.7.2

2

lib/createRightImagePipeline.js

@@ -29,3 +29,3 @@ const isAnimatedGIF = require("is-animated/lib/types/gif").isAnimated;

let args;
if (typeof value === "string") {
if (typeof value === "string" && processOption.canConvert(name)) {
args = processOption(name, value);

@@ -32,0 +32,0 @@ } else if (typeof value === "undefined") {

const optionConverters = {
resize: value => {
const match = value.match(/\d+(x|,)\d+/)
const match = value.match(/\d+(x|,)\d+/);
if (match === null) {
throw new Error(`invalid argument for resize ${value}`);
// eslint-disable-next-line
throw undefined;
}

@@ -17,7 +18,13 @@

if (!converter) {
throw new Error(`unsupported argument for ${name}`);
try {
return converter(value);
} catch (e) {
throw new Error(
`invalid argument for operation resize=${JSON.stringify(value)}`
);
}
};
return converter(value);
module.exports.canConvert = function canConvert(name) {
return !!optionConverters[name];
};
{
"name": "rightimage",
"version": "0.7.1",
"version": "0.7.2",
"description": "Stream images with dynamic re-orientation",

@@ -39,2 +39,3 @@ "main": "lib/index.js",

"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-promise": "^4.2.1",

@@ -41,0 +42,0 @@ "eslint-plugin-standard": "^4.0.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc