Open any Sketch file in Photopea and press File - Export - SVG. All properties of shapes, fills and strokes are preserved. You can include raster layers, text layers, or even rasterize text layers (to avoid worrying about fonts).
Photopea is written completely in Javascript.