I am trying to export and save an SVG file.
I have tried exportAsync in following code which is returning svg code, but how i can save it as svg file.
let node = figma.currentPage.selection[0];
node.exportAsync({format: 'SVG'}).then(res => console.log(String.fromCharCode.apply(null, res))).catch(err => console.error(err));
figma.closePlugin();
Please help 🙂