New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gm

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gm - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

5

History.md

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

## v1.0.2 - 01/24/2012
* added; debugging info on parser errors
* fixed; exports.version
## v1.0.1 - 01/12/2012

@@ -2,0 +7,0 @@

5

index.js

@@ -92,3 +92,6 @@

module.exports = exports = gm;
module.exports.version = "0.6.0";
module.exports.version = JSON.parse(
require('fs').readFileSync(__dirname + '/package.json', 'utf8')
).version;
console.error(module.exports.version);

75

lib/getters.js

@@ -87,44 +87,53 @@

var len = parts.length
, rgx = /^( *)([^:]+): *(.*)$/
, out = { indent: {} }
, level = null
, lastkey
, i = 0
, res
, o
try {
var len = parts.length
, rgx = /^( *)([^:]+): *(.*)$/
, out = { indent: {} }
, level = null
, lastkey
, i = 0
, res
, o
for (; i < len; ++i) {
res = rgx.exec(parts[i]);
if (!res) continue
for (; i < len; ++i) {
res = rgx.exec(parts[i]);
if (!res) continue
var indent = res[1].length
, key = res[2] ? res[2].trim() : ''
, val = res[3] ? res[3].trim() : null
var indent = res[1].length
, key = res[2] ? res[2].trim() : '';
// first iteration?
if (!level) {
level = indent
o = out.root = out.indent[level] = self.data;
} else if (indent < level) {
// outdent
o = out.indent[indent];
} else if (indent > level) {
// dropping into a nested object
out.indent[level] = o;
// wierd format, key/val pair with nested children. discard the val
o = o[lastkey] = {};
}
if ('Image' == key) continue;
level = indent;
var val = res[3] ? res[3].trim() : null;
if (val) {
o[key] = val;
// first iteration?
if (null === level) {
level = indent
o = out.root = out.indent[level] = self.data;
} else if (indent < level) {
// outdent
o = out.indent[indent];
} else if (indent > level) {
// dropping into a nested object
out.indent[level] = o;
// wierd format, key/val pair with nested children. discard the val
o = o[lastkey] = {};
}
if (key in helper) {
helper[key](o, val);
level = indent;
if (val) {
o[key] = val;
if (key in helper) {
helper[key](o, val);
}
}
lastkey = key;
}
lastkey = key;
} catch (err) {
err.message = err.message + "\n\n Identify stdout:\n " + stdout
throw err;
}

@@ -131,0 +140,0 @@

{ "name": "gm"
, "description": "Graphics Magick for node."
, "version": "1.0.1"
, "version": "1.0.2"
, "author": "Aaron Heckmann <aaron.heckmann+github@gmail.com>"

@@ -5,0 +5,0 @@ , "keywords": ["nodejs", "graphics magick", "graphics", "magick", "image", "graphicsmagick", "imagemagick"]

@@ -153,83 +153,83 @@ # gm

- getters
- [size](http://aheckmann.github.com/gm/#getters) - returns the size (WxH) of the image
- [orientation](http://aheckmann.github.com/gm/#orientation) - returns the EXIF orientation of the image
- [format](http://aheckmann.github.com/gm/#getters) - returns the image format (gif, jpeg, png, etc)
- [depth](http://aheckmann.github.com/gm/#getters) - returns the image color depth
- [color](http://aheckmann.github.com/gm/#getters) - returns the number of colors
- [res](http://aheckmann.github.com/gm/#getters) - returns the image resolution
- [filesize](http://aheckmann.github.com/gm/#getters) - returns image filesize
- [identify](http://aheckmann.github.com/gm/#getters) - returns all image data available
- [size](http://aheckmann.github.com/gm/docs.html#getters) - returns the size (WxH) of the image
- [orientation](http://aheckmann.github.com/gm/docs.html#orientation) - returns the EXIF orientation of the image
- [format](http://aheckmann.github.com/gm/docs.html#getters) - returns the image format (gif, jpeg, png, etc)
- [depth](http://aheckmann.github.com/gm/docs.html#getters) - returns the image color depth
- [color](http://aheckmann.github.com/gm/docs.html#getters) - returns the number of colors
- [res](http://aheckmann.github.com/gm/docs.html#getters) - returns the image resolution
- [filesize](http://aheckmann.github.com/gm/docs.html#getters) - returns image filesize
- [identify](http://aheckmann.github.com/gm/docs.html#getters) - returns all image data available
- manipulation
- [antialias](http://aheckmann.github.com/gm/#antialias)
- [autoOrient](http://aheckmann.github.com/gm/#autoOrient)
- [bitdepth](http://aheckmann.github.com/gm/#bitdepth)
- [blur](http://aheckmann.github.com/gm/#blur)
- [charcoal](http://aheckmann.github.com/gm/#charcoal)
- [chop](http://aheckmann.github.com/gm/#chop)
- [colors](http://aheckmann.github.com/gm/#colors)
- [colorize](http://aheckmann.github.com/gm/#colorize)
- [colorspace](http://aheckmann.github.com/gm/#colorspace)
- [comment](http://aheckmann.github.com/gm/#comment)
- [contrast](http://aheckmann.github.com/gm/#contrast)
- [crop](http://aheckmann.github.com/gm/#crop)
- [cycle](http://aheckmann.github.com/gm/#cycle)
- [despeckle](http://aheckmann.github.com/gm/#despeckle)
- [dither](http://aheckmann.github.com/gm/#dither)
- [edge](http://aheckmann.github.com/gm/#edge)
- [emboss](http://aheckmann.github.com/gm/#emboss)
- [enhance](http://aheckmann.github.com/gm/#enhance)
- [equalize](http://aheckmann.github.com/gm/#equalize)
- [flip](http://aheckmann.github.com/gm/#flip)
- [flop](http://aheckmann.github.com/gm/#flop)
- [gamma](http://aheckmann.github.com/gm/#gamma)
- [implode](http://aheckmann.github.com/gm/#implode)
- [label](http://aheckmann.github.com/gm/#label)
- [limit](http://aheckmann.github.com/gm/#limit)
- [lower](http://aheckmann.github.com/gm/#lower)
- [magnify](http://aheckmann.github.com/gm/#magnify)
- [median](http://aheckmann.github.com/gm/#median)
- [minify](http://aheckmann.github.com/gm/#minify)
- [modulate](http://aheckmann.github.com/gm/#modulate)
- [monochrome](http://aheckmann.github.com/gm/#monochrome)
- [morph](http://aheckmann.github.com/gm/#morph)
- [negative](http://aheckmann.github.com/gm/#negative)
- [noise](http://aheckmann.github.com/gm/#noise)
- [noProfile](http://aheckmann.github.com/gm/#profile)
- [paint](http://aheckmann.github.com/gm/#paint)
- [quality](http://aheckmann.github.com/gm/#quality)
- [raise](http://aheckmann.github.com/gm/#raise)
- [region](http://aheckmann.github.com/gm/#region)
- [resample](http://aheckmann.github.com/gm/#resample)
- [resize](http://aheckmann.github.com/gm/#resize)
- [roll](http://aheckmann.github.com/gm/#roll)
- [rotate](http://aheckmann.github.com/gm/#rotate)
- [scale](http://aheckmann.github.com/gm/#scale)
- [sepia](http://aheckmann.github.com/gm/#sepia)
- [sharpen](http://aheckmann.github.com/gm/#sharpen)
- [solarize](http://aheckmann.github.com/gm/#solarize)
- [spread](http://aheckmann.github.com/gm/#spread)
- [swirl](http://aheckmann.github.com/gm/#swirl)
- [thumb](http://aheckmann.github.com/gm/#thumb)
- [trim](http://aheckmann.github.com/gm/#trim)
- [type](http://aheckmann.github.com/gm/#type)
- [antialias](http://aheckmann.github.com/gm/docs.html#antialias)
- [autoOrient](http://aheckmann.github.com/gm/docs.html#autoOrient)
- [bitdepth](http://aheckmann.github.com/gm/docs.html#bitdepth)
- [blur](http://aheckmann.github.com/gm/docs.html#blur)
- [charcoal](http://aheckmann.github.com/gm/docs.html#charcoal)
- [chop](http://aheckmann.github.com/gm/docs.html#chop)
- [colors](http://aheckmann.github.com/gm/docs.html#colors)
- [colorize](http://aheckmann.github.com/gm/docs.html#colorize)
- [colorspace](http://aheckmann.github.com/gm/docs.html#colorspace)
- [comment](http://aheckmann.github.com/gm/docs.html#comment)
- [contrast](http://aheckmann.github.com/gm/docs.html#contrast)
- [crop](http://aheckmann.github.com/gm/docs.html#crop)
- [cycle](http://aheckmann.github.com/gm/docs.html#cycle)
- [despeckle](http://aheckmann.github.com/gm/docs.html#despeckle)
- [dither](http://aheckmann.github.com/gm/docs.html#dither)
- [edge](http://aheckmann.github.com/gm/docs.html#edge)
- [emboss](http://aheckmann.github.com/gm/docs.html#emboss)
- [enhance](http://aheckmann.github.com/gm/docs.html#enhance)
- [equalize](http://aheckmann.github.com/gm/docs.html#equalize)
- [flip](http://aheckmann.github.com/gm/docs.html#flip)
- [flop](http://aheckmann.github.com/gm/docs.html#flop)
- [gamma](http://aheckmann.github.com/gm/docs.html#gamma)
- [implode](http://aheckmann.github.com/gm/docs.html#implode)
- [label](http://aheckmann.github.com/gm/docs.html#label)
- [limit](http://aheckmann.github.com/gm/docs.html#limit)
- [lower](http://aheckmann.github.com/gm/docs.html#lower)
- [magnify](http://aheckmann.github.com/gm/docs.html#magnify)
- [median](http://aheckmann.github.com/gm/docs.html#median)
- [minify](http://aheckmann.github.com/gm/docs.html#minify)
- [modulate](http://aheckmann.github.com/gm/docs.html#modulate)
- [monochrome](http://aheckmann.github.com/gm/docs.html#monochrome)
- [morph](http://aheckmann.github.com/gm/docs.html#morph)
- [negative](http://aheckmann.github.com/gm/docs.html#negative)
- [noise](http://aheckmann.github.com/gm/docs.html#noise)
- [noProfile](http://aheckmann.github.com/gm/docs.html#profile)
- [paint](http://aheckmann.github.com/gm/docs.html#paint)
- [quality](http://aheckmann.github.com/gm/docs.html#quality)
- [raise](http://aheckmann.github.com/gm/docs.html#raise)
- [region](http://aheckmann.github.com/gm/docs.html#region)
- [resample](http://aheckmann.github.com/gm/docs.html#resample)
- [resize](http://aheckmann.github.com/gm/docs.html#resize)
- [roll](http://aheckmann.github.com/gm/docs.html#roll)
- [rotate](http://aheckmann.github.com/gm/docs.html#rotate)
- [scale](http://aheckmann.github.com/gm/docs.html#scale)
- [sepia](http://aheckmann.github.com/gm/docs.html#sepia)
- [sharpen](http://aheckmann.github.com/gm/docs.html#sharpen)
- [solarize](http://aheckmann.github.com/gm/docs.html#solarize)
- [spread](http://aheckmann.github.com/gm/docs.html#spread)
- [swirl](http://aheckmann.github.com/gm/docs.html#swirl)
- [thumb](http://aheckmann.github.com/gm/docs.html#thumb)
- [trim](http://aheckmann.github.com/gm/docs.html#trim)
- [type](http://aheckmann.github.com/gm/docs.html#type)
- drawing primitives
- [draw](http://aheckmann.github.com/gm/#draw)
- [drawArc](http://aheckmann.github.com/gm/#drawArc)
- [drawBezier](http://aheckmann.github.com/gm/#drawBezier)
- [drawCircle](http://aheckmann.github.com/gm/#drawCircle)
- [drawEllipse](http://aheckmann.github.com/gm/#drawEllipse)
- [drawLine](http://aheckmann.github.com/gm/#drawLine)
- [drawPoint](http://aheckmann.github.com/gm/#drawPoint)
- [drawPolygon](http://aheckmann.github.com/gm/#drawPolygon)
- [drawPolyline](http://aheckmann.github.com/gm/#drawPolyline)
- [drawRectangle](http://aheckmann.github.com/gm/#drawRectangle)
- [drawText](http://aheckmann.github.com/gm/#drawText)
- [fill](http://aheckmann.github.com/gm/#fill)
- [font](http://aheckmann.github.com/gm/#font)
- [fontSize](http://aheckmann.github.com/gm/#fontSize)
- [stroke](http://aheckmann.github.com/gm/#stroke)
- [strokeWidth](http://aheckmann.github.com/gm/#strokeWidth)
- [setDraw](http://aheckmann.github.com/gm/#setDraw)
- [draw](http://aheckmann.github.com/gm/docs.html#draw)
- [drawArc](http://aheckmann.github.com/gm/docs.html#drawArc)
- [drawBezier](http://aheckmann.github.com/gm/docs.html#drawBezier)
- [drawCircle](http://aheckmann.github.com/gm/docs.html#drawCircle)
- [drawEllipse](http://aheckmann.github.com/gm/docs.html#drawEllipse)
- [drawLine](http://aheckmann.github.com/gm/docs.html#drawLine)
- [drawPoint](http://aheckmann.github.com/gm/docs.html#drawPoint)
- [drawPolygon](http://aheckmann.github.com/gm/docs.html#drawPolygon)
- [drawPolyline](http://aheckmann.github.com/gm/docs.html#drawPolyline)
- [drawRectangle](http://aheckmann.github.com/gm/docs.html#drawRectangle)
- [drawText](http://aheckmann.github.com/gm/docs.html#drawText)
- [fill](http://aheckmann.github.com/gm/docs.html#fill)
- [font](http://aheckmann.github.com/gm/docs.html#font)
- [fontSize](http://aheckmann.github.com/gm/docs.html#fontSize)
- [stroke](http://aheckmann.github.com/gm/docs.html#stroke)
- [strokeWidth](http://aheckmann.github.com/gm/docs.html#strokeWidth)
- [setDraw](http://aheckmann.github.com/gm/docs.html#setDraw)

@@ -236,0 +236,0 @@ - image output

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