Reference · Flags a page registers itself
customAspectfunction
A custom flag's width over its height, from its viewBox, for keeping a box before it is drawn.
Import it
import { customAspect } from "@johnmorrisdotca/hata/custom";
Definition
function customAspect(id: string): number | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The flag's id, in any case. |
Returns
number | null
The aspect ratio, or null when no such flag is registered.
Examples
import { customAspect } from "@johnmorrisdotca/hata/custom";
console.log(customAspect("custom:nothing-here")); // nullnullWhat it prints (run when this page was built)