Gathering detailed insights and metrics for canvg
Gathering detailed insights and metrics for canvg
Gathering detailed insights and metrics for canvg
Gathering detailed insights and metrics for canvg
npm install canvg
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.5
Supply Chain
94.1
Quality
79.6
Maintenance
100
Vulnerability
100
License
TypeScript (53.06%)
JavaScript (39.44%)
HTML (5.01%)
MDX (2%)
CSS (0.42%)
Shell (0.07%)
Total Downloads
240,870,407
Last Day
98,823
Last Week
2,254,352
Last Month
9,669,941
Last Year
86,011,107
MIT License
3,753 Stars
1,120 Commits
619 Forks
65 Watchers
22 Branches
39 Contributors
Updated on Jun 23, 2025
Minified
Minified + Gzipped
Latest Version
4.0.3
Package Id
canvg@4.0.3
Unpacked Size
1.23 MB
Size
268.62 kB
File Count
169
NPM Version
8.19.4
Node Version
16.20.2
Published on
Mar 12, 2025
Cumulative downloads
Total Downloads
5
JavaScript SVG parser and renderer on Canvas. It takes the URL to the SVG file or the text of the SVG file, parses it in JavaScript and renders the result on Canvas. It also can be used to rasterize SVG images.
Quickstart
•
Docs
•
Demo
Install this library using your favorite package manager:
1pnpm add canvg 2# or 3yarn add canvg 4# or 5npm i canvg
Then, just import Canvg
and use it:
1import { Canvg } from 'canvg'; 2 3let v = null; 4 5window.onload = async () => { 6 const canvas = document.querySelector('canvas'); 7 const ctx = canvas.getContext('2d'); 8 9 v = await Canvg.from(ctx, './svgs/1.svg'); 10 11 // Start SVG rendering with animations and mouse handling. 12 v.start(); 13}; 14 15window.onbeforeunload = () => { 16 v.stop(); 17};
Description of all exports you can find in Documentation.
The end goal is everything from the SVG spec. The majority of the rendering and animation is working. If you would like to see a feature implemented, don't hesitate to add it to the issues list, or better is to create pull request 😎
0/10
Summary
canvg Prototype Pollution vulnerability
Affected Versions
< 3.0.11
Patched Versions
3.0.11
0/10
Summary
canvg Prototype Pollution vulnerability
Affected Versions
>= 4.0.0, < 4.0.3
Patched Versions
4.0.3
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
packaging workflow detected
Details
Reason
project is fuzzed
Details
Reason
Found 4/23 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
72 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
-6%
98,823
Compared to previous day
Last Week
-7.2%
2,254,352
Compared to previous week
Last Month
5.3%
9,669,941
Compared to previous month
Last Year
51.3%
86,011,107
Compared to previous year