Gazebo_simulation-Frontend/node_modules/svg-parser
Riddhi Dave f4870cd530 simulator page updates 2020-12-22 09:59:14 -05:00
..
dist React files 2020-12-21 10:29:31 -05:00
CHANGELOG.md React files 2020-12-21 10:29:31 -05:00
README.md React files 2020-12-21 10:29:31 -05:00
package.json simulator page updates 2020-12-22 09:59:14 -05:00

README.md

svg-parser

Take a string representing an SVG document or fragment, turn it into HAST JavaScript object.

Installation

npm install svg-parser, or grab it from npmcdn.com/svg-parser.

Usage

import { parse } from 'svg-parser';

const parsed = parse( `
	<svg viewBox='0 0 100 100'>
		<!-- stuff goes here... -->
	</svg>
` );
/*
{
  type: 'root',
  children: [
    {
      type: 'element',
      tagName: 'svg',
      properties: {
        viewBox: '0 0 100 100'
      },
      children: [...]
    }
  ]
}
*/

License

MIT