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
61.8
Supply Chain
94.1
Quality
78.9
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
3,680 Stars
1,118 Commits
613 Forks
65 Watching
22 Branches
40 Contributors
Updated on 28 Nov 2024
Minified
Minified + Gzipped
TypeScript (53.04%)
JavaScript (39.46%)
HTML (5.02%)
MDX (2%)
CSS (0.42%)
Shell (0.07%)
Cumulative downloads
Total Downloads
Last day
-5%
312,003
Compared to previous day
Last week
2.2%
1,691,863
Compared to previous week
Last month
11%
7,025,597
Compared to previous month
Last year
40.1%
67,634,736
Compared to previous year
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 😎
No vulnerabilities found.
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/22 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
58 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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 More