Skip to main content
Deno 2 is finally here šŸŽ‰ļø
Learn more

About

A toolset helps manipulate SVG 1.1 path data.

Usage

Parser

Example | Docs | Options

Error Handling

Example | Docs

Transformer

Example | Docs

Generator

Example | Docs | Options

CLI

Installation:

$ deno install -n svg-path https://raw.githubusercontent.com/ycw/svg-path/main/cli/mod.ts

Example:

$ echo "M 60 50 z" | svg-path -w 100 -h 100 --terse

Output:

M.6.5z

Available flags:

Flag Default Description
--terse Eliminate unnecessary whitespaces and leading zeros.
--combine Eliminate unnecessary command letters.
--mulitline Separate commands by line feeds.
-t 4 Decimal places that a decimal number is truncated to.
-x 0 Transformation frameā€™s x.
-y 0 Transformation frameā€™s y.
-w 1 Transformation frameā€™s signed width.
-h 1 Transformation frameā€™s signed height.