本文へ移動

Hata旗

国や地域の旗を読み込み、対応する表示の形を選び、絵ごとの資料・作者・ライセンスを保てます。

「旗(はた)」は、旗を表す日本語です。 名前について(英語)

目次

リファレンス

国際機関の旗

import { … } from "@johnmorrisdotca/hata/organisations";

最小化と gzip 圧縮をしたサイズは 21.7 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
isOrganisationId関数True for one of the ids with a flag here, written exactly as this package writes it: "org:eu".
loadOrganisationFlag関数Any organisation's flag as an SVG string, loaded when it is asked for: each drawing is a module of its own (@johnmorrisdotca/hata/organisations/<slug>), so a page carries the drawings it asks for and no others.
ORGANISATION_IDS定数Every organisation id with a flag, in the order of the table.
organisationAspect関数An organisation's flag's width over its height, from its viewBox: 1.5 for the European Union's 3:2.
organisationFlag関数An organisation's flag as an SVG string, the same kind of string a country's module holds: it has a viewBox and no width or height.
organisationId関数The id of an organisation's flag, from an id written loosely: either case, with spaces around it.
OrganisationId型The id of an organisation's flag, written exactly as this package writes it: org: and a lower-case slug.
organisationName関数An organisation's name, in English or Japanese: what a screen reader should say for the flag, or a caption.
organisationSource関数Where a drawing taken from Wikimedia Commons comes from: its file, its page, its licence as Commons states it (public domain or CC0, never share-alike) and its author as Commons gives it.
organisationTerms関数Where the terms for an organisation's flag were read: the page, the day, and what they say.

ソースを見るGitHub で編集@johnmorrisdotca/hata 1.31.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。