svgconstant
The flag of Pakistan (パキスタン), PK, as an SVG string: viewBox 120 by 80 (3:2), 378 B. From Wikimedia Commons, "Flag of Pakistan.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 { svg } from "@johnmorrisdotca/hata/flags/pk";
Definition
const svg: string = "<svg data-hata=\"pk\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-75 -40 120 80\"><title>Flag of Pakistan</title><path fill=\"#fff\" d=\"M-75-40H45v80H-75z\"/><path fill=\"#01411c\" d=\"M-45-40h90v80h-90z\"/><circle r=\"24\" fill=\"#fff\"/><circle cx=\"-7\" cy=\"-40\" r=\"22\" fill=\"#01411c\" transform=\"rotate(-41.63354, 45, -40)\"/><path fill=\"#fff\" d=\"m8.8-18 10 11.4L4-9.8 18-16 10.1-3z\"/></svg>"
Examples
Example 1
import flag from "@johnmorrisdotca/hata/flags/pk";
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/pk";
console.log(svg.startsWith("<svg"),svg.length);true 378What it prints (run when this page was built)