Reference · Flags a page registers itself
customFlagfunction
A registered custom flag's SVG, the checked and rewritten one, with a viewBox and no width or height, like a country's: frame() and toDataUri() from the main entry take it.
Import it
import { customFlag } from "@johnmorrisdotca/hata/custom";
Definition
function customFlag(id: string): string | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The flag's id, in any case. |
Returns
string | null
The SVG string, or null when no such flag is registered.
Examples
import { customFlag } from "@johnmorrisdotca/hata/custom";
console.log(customFlag("custom:nothing-here")); // nullnullWhat it prints (run when this page was built)