Installations
npm install tiny-svg
Developer
bpmn-io
Developer Guide
Module System
ESM
Min. Node Version
>= 16
Typescript Support
Yes
Node Version
20.17.0
NPM Version
10.8.2
Statistics
49 Stars
123 Commits
15 Forks
11 Watching
2 Branches
10 Contributors
Updated on 17 Oct 2024
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
10,400,423
Last day
7.7%
15,829
Compared to previous day
Last week
14.7%
85,575
Compared to previous week
Last month
3.5%
337,013
Compared to previous month
Last year
37.9%
3,546,120
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
tiny-svg
tiny-svg is a minimal toolbelt for creating clean SVG applications.
Features
- no wrapping magic, using native DOM elements instead
- modular, just use what you need
2kB
minified + gzippedinnerSVG
support- simplified attribute handling
- geometry helpers
Checkout provided utilities.
Usage
1import { 2 appendTo, 3 classes, 4 create, 5 innerSVG 6} from 'tiny-svg'; 7 8var container = document.createElement('div'); 9var element = appendTo(create('svg'), container); 10 11var g = appendTo(create('g'), element); 12 13// add classes, SVG style! 14classes(g).add('foo'); 15 16var text = ` 17 <g class="foo bar"> 18 <rect x="0" y="0" width="0" height="0" rx="50" ry="50"/> 19 </g> 20`; 21 22// set innerSVG 23innerSVG(g, text);
Your favourite module bundler should apply tree-shaking to only include the components your application requires. If you're using CommonJS modules give common-shake a try.
Related
License
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found linked content: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/bpmn-io/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/bpmn-io/.github/SECURITY.md:1
Reason
2 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
Reason
4 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/tiny-svg/CI.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/CI.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/bpmn-io/tiny-svg/CI.yml/main?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 1 out of 1 npmCommand dependencies pinned
Reason
Found 3/21 approved changesets -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/CI.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 12 are checked with a SAST tool
Score
4.5
/10
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