SVG Path Data Parser
JSON →path-data-parser is a lightweight and tree-shakable JavaScript library designed for parsing and manipulating SVG path data strings. It currently stands at version 0.1.0, indicating a stable but early-stage release, likely following an 'as-needed' or infrequent release cadence given its focused utility. Its key differentiators include its small footprint and a direct API offering four core functions: `parsePath` for converting SVG path strings into an array of segment objects, `serialize` for converting segment arrays back into path strings, `absolutize` for transforming relative path commands to absolute ones, and `normalize` for simplifying path segments to only M, L, C, and Z commands. This normalization is particularly useful for rendering SVG paths on non-SVG graphics platforms like Canvas, providing a consistent data structure for further processing.
Traffic · last 30 days ↑200% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany · 🇳🇴 Norway