svgconstant
The flag of Faroe Islands (フェロー諸島), FO, as an SVG string: viewBox 22 by 16 (11:8), 258 B. From Wikimedia Commons, "Flag of the Faroe Islands.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/fo";
Definition
const svg: string = "<svg data-hata=\"fo\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 22 16\"><path fill=\"#fff\" d=\"M0 0h22v16H0z\"/><g fill=\"#005eb8\"><path d=\"M6 0h4v16H6z\"/><path d=\"M0 6h22v4H0z\"/></g><g fill=\"#ef3340\"><path d=\"M7 0h2v16H7z\"/><path d=\"M0 7h22v2H0z\"/></g></svg>"
Examples
Example 1
import flag from "@johnmorrisdotca/hata/flags/fo";
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/fo";
console.log(svg.startsWith("<svg"),svg.length);true 258What it prints (run when this page was built)