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

svg2canvas

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg2canvas - npm Package Compare versions

Comparing version 0.0.10 to 0.0.11

1

build/index.d.ts

@@ -7,2 +7,3 @@ export declare type Color = {

export declare function parseColor(col: string): Color;
export declare function ColorToHex(col: Color): string;
export declare function blend({ r: r1, g: g1, b: b1 }: Color, { r: r2, g: g2, b: b2 }: Color, a: number): Color;

@@ -9,0 +10,0 @@ declare type Style = {

23

build/index.js

@@ -0,1 +1,2 @@

"use strict";
var __assign = (this && this.__assign) || function () {

@@ -19,3 +20,5 @@ __assign = Object.assign || function(t) {

};
export function parseColor(col) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateDrawingFromSVG = exports.SVGDrawing = exports.Drawing = exports.blend = exports.ColorToHex = exports.parseColor = void 0;
function parseColor(col) {
var is6DigitHex = /^\#(?:[0-9A-F]{6})$/i;

@@ -30,3 +33,11 @@ if (!is6DigitHex.test(col))

}
export function blend(_a, _b, a) {
exports.parseColor = parseColor;
function ColorToHex(col) {
return "#" + [col.r, col.g, col.b].map(function (x) {
var hex = Math.round(x).toString(16);
return (hex.length === 1 ? '0' + hex : hex);
}).join('');
}
exports.ColorToHex = ColorToHex;
function blend(_a, _b, a) {
var r1 = _a.r, g1 = _a.g, b1 = _a.b;

@@ -40,2 +51,3 @@ var r2 = _b.r, g2 = _b.g, b2 = _b.b;

}
exports.blend = blend;
var StyleNames = [

@@ -202,3 +214,3 @@ ["fillStyle", "fill", "black"],

}());
export { Drawing };
exports.Drawing = Drawing;
var SVGDrawing = /** @class */ (function () {

@@ -231,3 +243,3 @@ function SVGDrawing(width, height) {

}());
export { SVGDrawing };
exports.SVGDrawing = SVGDrawing;
var Shapes = {

@@ -310,3 +322,3 @@ "rect": {

};
export function CreateDrawingFromSVG(svg, globalStyle) {
function CreateDrawingFromSVG(svg, globalStyle) {
if (!svg)

@@ -374,1 +386,2 @@ return undefined;

}
exports.CreateDrawingFromSVG = CreateDrawingFromSVG;
{
"name": "svg2canvas",
"version": "0.0.10",
"version": "0.0.11",
"description": "Library to allow batching and rendering of SVGs onto the canvas EFFICIENTLY. Currently only compatible w/ simple geometry.",

@@ -5,0 +5,0 @@ "keywords": [

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