Socket
Socket
Sign inDemoInstall

gulp-svg2png

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

gulp-svg2png - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

24

index.js

@@ -57,2 +57,17 @@ /*

/**
* UUID generator
*
* @return {string} The generated UUID.
*
*/
function uuid () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (chr) {
var rand = Math.random() * 16|0;
var value = chr == 'x' ? rand : (rand&0x3|0x8);
return value.toString(16);
});
}
/**
* Checks if the given file is a SVG.

@@ -62,3 +77,3 @@ *

*
* @return {Boolean} [description]
* @return {Boolean}
*

@@ -102,3 +117,3 @@ */

function convert (source, cb) {
var temp = path.join(os.tmpdir(), Math.round(Math.random()*1000).toString() + Date.now() + '-' + rename(path.basename(source.path))),
var temp = path.join(os.tmpdir(), uuid() + '-' + rename(path.basename(source.path))),
png;

@@ -116,7 +131,8 @@

png = new gutil.File({
path: rename(path.basename(source.path)),
base: source.base,
path: rename(source.path),
contents: data
});
// Cleanup - Deletes the temp file.
// Cleanup - Delete the temp file.
fs.unlink(temp, done);

@@ -123,0 +139,0 @@ }

2

package.json
{
"name": "gulp-svg2png",
"version": "0.2.2",
"version": "0.2.3",
"description": "A gulp plugin for converting SVGs to PNGs.",

@@ -5,0 +5,0 @@ "author": {

@@ -36,2 +36,7 @@ # gulp-svg2png [![Build Status](https://travis-ci.org/akoenig/gulp-svg2png.png?branch=master)](https://travis-ci.org/akoenig/gulp-svg2png)

### Version 0.2.3 (20140404)
- Retain folder hierarchy.
- Implemented UUID for temp file naming.
### Version 0.2.2 (20140221)

@@ -38,0 +43,0 @@

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