defaultconstant
The flag of New Mexico (ニューメキシコ州), US-NM, as an SVG string: viewBox 1800 by 1200 (3:2), 416 B. From Wikimedia Commons, "Flag of New Mexico.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/us-nm";
Definition
const svg: string = "<svg data-hata=\"us-nm\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1800 1200\"><path fill=\"gold\" d=\"M0 0h1800v1200H0z\"/><path stroke=\"#bf0a30\" stroke-linecap=\"round\" stroke-width=\"27\" d=\"M956.5 353.4v493.2m-37.7-533.1v573m-37.6-573v573m-37.7-533.1v493.2M653.4 543.5h493.2m-533.1 37.7h573m-573 37.6h573m-533.1 37.7h493.2\"/><circle cx=\"900\" cy=\"600\" r=\"93.3\" fill=\"gold\" stroke=\"#bf0a30\" stroke-width=\"13.5\"/></svg>"
Examples
Example 1
import flag from "@johnmorrisdotca/hata/flags/us-nm";
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/us-nm";
console.log(svg.startsWith("<svg"),svg.length);true 416What it prints (run when this page was built)