Socket
Socket
Sign inDemoInstall

svg2png

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg2png - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

README.md

18

lib/converter.js

@@ -0,5 +1,5 @@

/* eslint-env phantomjs */
/* eslint-disable no-console, no-var, prefer-arrow-callback, object-shorthand */
"use strict";
/* global phantom: true, atob: true */
var webpage = require("webpage");

@@ -89,8 +89,8 @@ var system = require("system");

return page.evaluate(function (width, height) {
/* global document: true */
page.evaluate(function (widthInside, heightInside) {
/* global document: false */
var el = document.querySelector("svg");
if (width !== undefined) {
el.setAttribute("width", width + "px");
if (widthInside !== undefined) {
el.setAttribute("width", widthInside + "px");
} else {

@@ -100,4 +100,4 @@ el.removeAttribute("width");

if (height !== undefined) {
el.setAttribute("height", height + "px");
if (heightInside !== undefined) {
el.setAttribute("height", heightInside + "px");
} else {

@@ -111,3 +111,3 @@ el.removeAttribute("height");

return page.evaluate(function () {
/* global document: true */
/* global document: false */

@@ -114,0 +114,0 @@ var el = document.querySelector("svg");

@@ -64,4 +64,4 @@ "use strict";

if (stdout.length > 0) {
// PhantomJS always outputs to stdout.
throw new Error(stdout.replace(/\r/g, "").trim());
// PhantomJS always outputs to stdout.
throw new Error(stdout.replace(/\r/g, "").trim());
}

@@ -68,0 +68,0 @@

{
"name": "svg2png",
"description": "Converts SVGs to PNGs, using PhantomJS",
"version": "4.1.0",
"version": "4.1.1",
"author": "Domenic Denicola <d@domenic.me> (https://domenic.me)",

@@ -17,18 +17,18 @@ "license": "WTFPL",

"rebaseline": "node test/success-tests/rebaseline.js",
"lint": "jshint lib && jshint test"
"lint": "eslint lib test"
},
"dependencies": {
"file-url": "^1.1.0",
"phantomjs-prebuilt": "^2.1.10",
"file-url": "^2.0.0",
"phantomjs-prebuilt": "^2.1.14",
"pn": "^1.0.0",
"yargs": "^5.0.0"
"yargs": "^6.5.0"
},
"devDependencies": {
"chai": "^3.4.1",
"chai-as-promised": "^5.2.0",
"jshint": "^2.8.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"eslint": "^3.12.2",
"mkdirp": "^0.5.1",
"mocha": "^3.0.2",
"rimraf": "^2.5.0"
"mocha": "^3.2.0",
"rimraf": "^2.5.4"
}
}
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