svg-path-command
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

svg-path-command

npm version Test Status License MIT codecov

SVG path data parser library.

Install

npm i svg-path-command

Use

import { parse } from 'svg-path-command'

const pathCommand = parse('M2,8 L5,2 L8,8')
console.log(pathCommand.stringify()) // 'M2 8 L5 2 L8 8'

pathCommand.commands[0].updateParams([4, 16])

pathCommand.commands[1].updateValue({
  x: 10,
  y: 4,
})

console.log(pathCommand.stringify()) // 'M4 16 L10 4 L8 8'

See API Doc for detailed usage

License

MIT License.

Readme

Keywords

Package Sidebar

Install

npm i svg-path-command

Weekly Downloads

2

Version

2.0.0

License

MIT

Unpacked Size

19.6 kB

Total Files

26

Last publish

Collaborators

  • kimulaco