SVG Path Parser
JSON →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.
Traffic · last 30 days ↓71% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇷 France · 🇧🇷 Brazil · 🇵🇱 Poland