svgconstant
The flag of Yugoslavia (ユーゴスラビア), YUCS, as an SVG string: viewBox 1000 by 500 (2:1), 382 B. From Wikimedia Commons, "Flag of Yugoslavia (1946-1992).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/yucs";
Definition
const svg: string = "<svg data-hata=\"yucs\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1000 500\"><path fill=\"#003893\" d=\"M0 0h1000v500H0z\"/><path fill=\"#fff\" d=\"M0 166.7h1000V500H0z\"/><g fill=\"#de0000\"><path d=\"M0 333.3h1000V500H0z\"/><path fill-rule=\"evenodd\" stroke=\"#fcd115\" stroke-width=\"8.9\" d=\"M500 97.7 534.2 203h110.6l-89.5 65 34.2 105.3-89.5-65-89.5 65L444.7 268l-89.5-65h110.6z\"/></g></svg>"
Examples
Example 1
import flag from "@johnmorrisdotca/hata/flags/yucs";
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/yucs";
console.log(svg.startsWith("<svg"),svg.length);true 382What it prints (run when this page was built)