SVG Path Parser

JSON →
library 1.1.0 ·javascript maintenance
verified May 27, 2026

svg-path-parser is a JavaScript library designed for parsing SVG `d` attribute path strings into a structured array of command objects. It is currently at version 1.1.0, with its last major update in 2020, suggesting it is in a maintenance phase rather than active development. The library provides a programmatic way to interpret complex SVG path data, converting shorthand notations (e.g., multiple consecutive `L` commands) into individual, distinct command objects. A key differentiator is its ability to convert all path commands to their absolute coordinate equivalents using the `makeAbsolute` function, which is useful for simplifying subsequent geometric calculations or transformations. It leverages a PEG.js grammar for robust parsing and is primarily designed for Node.js environments, shipping as a CommonJS module.

total hits 15
actors 4 distinct systems
last hit 18h ago human
GPTBot
5
Script
1
Search engines
1
Humans
4

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇧🇷 Brazil · 🇵🇱 Poland