Pathinator is an SVG path builder and minifier for Node.js and the browser. Version 0.4.3 provides a chainable API to programmatically construct SVG path data via commands like moveTo, lineTo, cubic/quadratic curves, and arc, then export to optimized path strings with optional compression. It also includes an optimizeSvgPaths function to batch-optimize all path and polygon/polyline data in an SVG string or DOM Document. The library is lightweight, has no dependencies, and works in both ESM and older JS environments. Compared to alternatives like svg.js or Snap.svg, Pathinator focuses specifically on path data manipulation and minification rather than full SVG rendering or DOM manipulation.
npm install pathinatorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows chainable path construction with Path class, export with compression, and batch optimization of SVG strings.
Use await or .then() to handle the result.
Use await or .then() to get the exported path string.
Ensure you call export() on a Path object, e.g., new Path().move(10,10).export()
No dependency data recorded yet.