defaultconstant
The flag of Nara (奈良県), JP-29, as an SVG string: viewBox 1200 by 800 (3:2), 373 B. From Wikimedia Commons, "Flag of Nara Prefecture.svg" (public domain); 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/jp-29";
Definition
const svg: string = "<svg data-hata=\"jp-29\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1200 800\"><desc>Flag of Nara Prefecture</desc><path fill=\"#fff\" d=\"M0 0h1200v800H0z\"/><circle cx=\"570\" cy=\"400\" r=\"220\" fill=\"#5b1c1f\"/><circle cx=\"430\" cy=\"400\" r=\"76\" fill=\"#fff\"/><path stroke=\"#5b1c1f\" stroke-width=\"80\" d=\"M430 400h420\"/><path stroke=\"#fff\" stroke-width=\"10\" d=\"M340 400h25\"/></svg>"
Examples
Example 1
import flag from "@johnmorrisdotca/hata/flags/jp-29";
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/jp-29";
console.log(svg.startsWith("<svg"),svg.length);true 373What it prints (run when this page was built)