nano-svg2js SVG to JS. API parseSVG(svg_text) Return Promise object of parsed svg. optimizeIds(jsvg) Returns modified(in place) jsvg tree with short ids except symbols identifiers. optimizeJSVG(jsvg) Returns optimized in place jsvg tree. packJSVG(jsvg) Returns packed JSVG tree.