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

imagemagick-stream

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imagemagick-stream - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

20

index.js

@@ -160,2 +160,14 @@ "use strict";

/**
* Sets the `annotate` option
*
* @param {String} args
* @api public
*/
annotate (degrees, text) {
this[operators].push('-annotate', degrees, text);
return this;
}
/**
* Passes additional settings

@@ -170,3 +182,5 @@ *

this[settings].push(`-${key}`);
if (val != null) this[settings].push(val);
if (val == null) return this;
if (!Array.isArray(val)) val = [val];
val.forEach(v => this[settings].push(v));
return this;

@@ -185,3 +199,5 @@ }

this[operators].push(`-${key}`);
if (val != null) this[operators].push(val);
if (val == null) return this;
if (!Array.isArray(val)) val = [val];
val.forEach(v => this[operators].push(v));
return this;

@@ -188,0 +204,0 @@ }

2

package.json
{
"name": "imagemagick-stream",
"version": "4.0.1",
"version": "4.1.0",
"description": "Streaming Imagemagick api",

@@ -5,0 +5,0 @@ "keywords": [

@@ -169,2 +169,13 @@ var assert = require('assert');

describe('.annotate()', function () {
it('should set the annotate option', function () {
var img = im().annotate('0', "'text'");
var args = img.args();
assert(args.length == 5);
assert(args[1] == '-annotate');
assert(args[2] == '0');
assert(args[3] == "'text'");
});
});
describe('.inputFormat()', function () {

@@ -198,2 +209,12 @@ it('should set the input format', function () {

});
it('should accept a key and an array', function () {
var img = im();
img.op('annotate', ['0', "'text'"]);
var args = img.args();
assert(args[1] == '-annotate');
assert(args[2] == '0');
assert(args[3] == "'text'");
});
});

@@ -216,2 +237,12 @@

it('should accept a key and an array', function () {
var img = im();
img.set('something', ['hello', 'world']);
var args = img.args();
assert(args[0] == '-something');
assert(args[1] == 'hello');
assert(args[2] == 'world');
});
it('should be combinable with freehand operations', function() {

@@ -218,0 +249,0 @@ var img = im();

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