militaryAspect関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A flag's width over its height, from its viewBox: 1.5 for the Self-Defense Force ensign's 3 to 2. For keeping a box before the picture is drawn.
インポート
import { militaryAspect } from "@johnmorrisdotca/hata/military";
定義
function militaryAspect(id: string): number | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | string | A flag's id, in any case, with or without |
戻り値
number | null
The aspect ratio, or null when the set has no such flag.
例
import { militaryAspect } from "@johnmorrisdotca/hata/military";
console.log(militaryAspect("mil:jp-jmsdf-ensign")); // 1.5
console.log(militaryAspect("mil:gb-white-ensign")); // 21.5
2出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。