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

generate-avatar

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-avatar - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

9

dist/generateFromString.js

@@ -11,2 +11,9 @@ "use strict";

var md5hash_1 = require("./md5hash");
function hexToRgb(hex) {
var bigint = parseInt(hex, 16);
var r = (bigint >> 16) & 255;
var g = (bigint >> 8) & 255;
var b = bigint & 255;
return r + "," + g + "," + b;
}
function invertHex(hex) {

@@ -24,3 +31,3 @@ return (Number("0x1" + hex) ^ 0xffffff).toString(16).substr(1).toUpperCase();

function hydrateSVGBlog(data) {
var svgString = "<svg width=\"300\" height=\"300\" viewBox=\"0 0 300 300\" xmlns=\"http://www.w3.org/2000/svg\"><rect id=\"bg\" width=\"300\" height=\"300\" fill=\"#" + data.background + "\" /><path d=\"" + data.paths[0] + "\" fill=\"#" + data.colors[0] + "\" /><path d=\"" + data.paths[1] + "\" fill=\"#" + data.colors[1] + "\" /><path d=\"" + data.paths[2] + "\" fill=\"#" + data.colors[2] + "\" /></svg>";
var svgString = "<svg width=\"300\" height=\"300\" viewBox=\"0 0 300 300\" xmlns=\"http://www.w3.org/2000/svg\"><rect id=\"bg\" width=\"300\" height=\"300\" fill=\"rgb(" + hexToRgb(data.background) + ")\" /><path d=\"" + data.paths[0] + "\" fill=\"rgb(" + hexToRgb(data.colors[0]) + ")\" /><path d=\"" + data.paths[1] + "\" fill=\"rgb(" + hexToRgb(data.colors[1]) + ")\" /><path d=\"" + data.paths[2] + "\" fill=\"rgb(" + hexToRgb(data.colors[2]) + ")\" /></svg>";
return svgString;

@@ -27,0 +34,0 @@ }

2

package.json
{
"name": "generate-avatar",
"version": "1.3.1",
"version": "1.4.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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