
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
svg-path-bbox
Advanced tools
SVG paths bounding box calculator.
npm install svg-path-bbox
> import { svgPathBbox } from "svg-path-bbox";
> svgPathBbox("M5 10l2 3z")
[ 5, 10, 7, 13 ]
> svgPathBbox("M5 10c3 0 3 3 0 3z")
[ 5, 10, 7.25, 13 ]
Returned bounding box is an array made up like viewBox
SVG attributes [x0, y0, x1, y1]
of unrounded values:
$ svg-path-bbox "M5 10c3 0 3 3 0 3z"
5 10 7.25 13
$ svg-path-bbox "M5 10c3 0 3 3 0 3z" "M2 8m5 5z"
5 10 7.25 13
2 8 7 13
import { svgPathBbox } from "svg-path-bbox";
import type { BBox } from "svg-path-bbox";
const cases: [string, BBox][] = [["M0 0H3V6Z", [0, 0, 3, 6]]];
console.log(svgPathBbox(cases[0]));
# svgPathBbox(d : string | typeof import('svgpath')) ⇒ [minX: number, minY: number, maxX: number, maxY: number]
Computes the bounding box of SVG path following the SVG 1.1 specification.
SvgPath
interface from svgpath.[2.1.0] - 2024-09-04
SvgPath
interface from [svgpath] as argument. This makes
svgPathBbox
x2 faster when using SvgPath
instances.FAQs
Compute bounding boxes of SVG paths.
The npm package svg-path-bbox receives a total of 10,103 weekly downloads. As such, svg-path-bbox popularity was classified as popular.
We found that svg-path-bbox demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.