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
; const parsed = ;/*{ type: 'root', children: [ { type: 'element', tagName: 'svg', properties: { viewBox: '0 0 100 100' }, children: [...] } ]}*/
License
MIT