defaultconstant
The flag of Guernsey (ガーンジー), GG, as an SVG string: viewBox 36 by 24 (3:2), 274 B. From Wikimedia Commons, "Flag of Guernsey.svg" (CC0); the /manifest entry gives its author, licence and why it was chosen. It has a viewBox and no width or height, so it fills the box it is put in at its own aspect ratio.
Import it
import value from "@johnmorrisdotca/hata/flags/gg";
Definition
const svg: string = "<svg data-hata=\"gg\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 36 24\"><path fill=\"#fff\" d=\"M0 0h36v24H0z\"/><path fill=\"#e8112d\" d=\"M21 0v9h15v6H21v9h-6v-9H0V9h15V0z\"/><path fill=\"#f9dd16\" d=\"m9 14 1-1h7v7l-1 1h4l-1-1v-7h7l1 1v-4l-1 1h-7V4l1-1h-4l1 1v7h-7l-1-1z\"/></svg>"
Examples
Example 1
import flag from "@johnmorrisdotca/hata/flags/gg";
const host=document.createElement("div");
host.innerHTML = flag; // or toDataUri(flag) from "@johnmorrisdotca/hata" for an <img src>
console.log(host.querySelector("svg")?.getAttribute("viewBox"));Example 2
import { svg } from "@johnmorrisdotca/hata/flags/gg";
console.log(svg.startsWith("<svg"),svg.length);true 274What it prints (run when this page was built)