🚀 Socket Launch Week 🚀 Day 4: Introducing Historical Analytics.Learn More
Socket
Sign inDemoInstall
Socket

imagemagick-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imagemagick-cli - npm Package Compare versions

Comparing version

to
0.1.3

.nyc_output/7a4961995236a01ea4d6a398f4f6f641.json

9

package.json
{
"name": "imagemagick-cli",
"version": "0.1.1",
"version": "0.1.3",
"description": "Access the ImageMagick CLI tools from Node. Cross-platform, with support for ImageMagick 6 and 7.",

@@ -36,8 +36,3 @@ "main": "./src/index.js",

},
"dependencies": {
"chalk": "^2.3.0",
"command-exists": "^1.2.2",
"commander": "^2.12.2",
"mkdirp": "^0.5.1"
}
"dependencies": {}
}
# node-imagemagick-cli
[![CircleCI](https://circleci.com/gh/dwmkerr/node-imagemagick-cli.svg?style=shield)](https://circleci.com/gh/dwmkerr/node-imagemagick-cli) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/3e334rknhjbpx555?svg=true)](https://ci.appveyor.com/project/dwmkerr/node-imagemagick-cli) [![codecov](https://codecov.io/gh/dwmkerr/node-imagemagick-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/dwmkerr/node-imagemagick-cli) [![dependencies Status](https://david-dm.org/dwmkerr/node-imagemagick-cli/status.svg)](https://david-dm.org/dwmkerr/node-imagemagick-cli) [![devDependencies Status](https://david-dm.org/dwmkerr/node-imagemagick-cli/dev-status.svg)](https://david-dm.org/dwmkerr/node-imagemagick-cli?type=dev)
[![CircleCI](https://circleci.com/gh/dwmkerr/node-imagemagick-cli.svg?style=shield)](https://circleci.com/gh/dwmkerr/node-imagemagick-cli) [![Build status](https://ci.appveyor.com/api/projects/status/uwggloq6ooxq1vtj?svg=true)](https://ci.appveyor.com/project/dwmkerr/node-imagemagick-cli) [![codecov](https://codecov.io/gh/dwmkerr/node-imagemagick-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/dwmkerr/node-imagemagick-cli) [![dependencies Status](https://david-dm.org/dwmkerr/node-imagemagick-cli/status.svg)](https://david-dm.org/dwmkerr/node-imagemagick-cli) [![devDependencies Status](https://david-dm.org/dwmkerr/node-imagemagick-cli/dev-status.svg)](https://david-dm.org/dwmkerr/node-imagemagick-cli?type=dev)

@@ -46,2 +46,26 @@ Access the ImageMagick CLI tools from Node. Cross-platform, with support for ImageMagick 6 and 7.

## API
Execute a command:
```node
imagemagickCli
.exec('convert -version')
.then(({ stdout, stderr }) => {
console.log(`Output: ${stdout}`);
});
```
Check the ImageMagick version:
```node
imagemagickCli
.getVersion()
.then((version) => {
console.log(`Version: ${version}`);
});
```
If the version cannot be identified (most likely because ImageMagick is not installed) then the function resolves with `null`.
## Prior Art / Design Goals

@@ -48,0 +72,0 @@

const exec = require('./exec');
const getVersion = require('./get-version');
module.exports = {
exec,
getVersion,
};

@@ -20,4 +20,2 @@ const childProcess = require('child_process');

console.log(`where has returned: ${stdout}`);
const options = stdout.split('\r\n');

@@ -29,3 +27,2 @@

const result = regexes[i].test(options[j]);
console.log(`testing with '${regexes[i]}' with '${options[j]}' returned: ${result}`);
if (result) return resolve(options[j]);

@@ -32,0 +29,0 @@ }

Sorry, the diff of this file is not supported yet