svgconstant
The flag of Bahia (バイーア州), BR-BA, as an SVG string: viewBox 1500 by 1000 (3:2), 299 B. From Wikimedia Commons, "Bandeira da Bahia.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/br-ba";
Definition
const svg: string = "<svg data-hata=\"br-ba\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"#fff\" viewBox=\"0 0 1500 1000\"><title>Bandeira da Bahia</title><path d=\"M0 0h1500v1000H0z\"/><path fill=\"#d31920\" d=\"M0 250h1500v250H500zm0 500h1500v250H0z\"/><path fill=\"#003087\" d=\"M0 0h500v500H0z\"/><path d=\"M54 410h392L250 70z\"/></svg>"
Examples
Example 1
import flag from "@johnmorrisdotca/hata/flags/br-ba";
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/br-ba";
console.log(svg.startsWith("<svg"),svg.length);true 299What it prints (run when this page was built)