本文へ移動

Hata旗

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

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

目次

リファレンス

船の信号旗(国際信号書)

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

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

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

エクスポート

名前種類概要
isSignalId関数True for an id of this set, written exactly as this package writes it ("ics:a").
SIGNAL_IDS定数Every id of the set: the Code's 40 flags in the order of its plate (the letters, the numeral pennants, the substitutes, then the answering pennant), then 18 of the special pennants of the United States Navy, usn:code-answer to usn:turn.
signalAspect関数A flag's width over its height, from its viewBox: 1.2 for a letter flag, 3.5 for a numeral pennant.
signalFlag関数A flag as an SVG string: it has a viewBox and no width or height, a square-ish letter flag, a tapering numeral pennant, a triangular substitute.
signalId関数The id of a flag from an id written loosely: either case, with spaces around it, with or without ics:.
SignalId型The id of one of the Code's flags, written exactly as this package writes it: ics: and a lower-case slug.
signalInfo関数Everything the package knows of a flag: its group (letter, numeral, substitute or answer), both names, its meaning, its status (official: the design is the Code's own), a note on how it was drawn, the page it was read from and its aspect ratio.
SignalInfo型What the package knows of one flag of the Code: its id, group, both names, meaning, status, note, source and aspect ratio.
signalMeaning関数What the flag means, as the Code gives it for a letter, or what it does for a figure, a substitute or the answering pennant, in English or Japanese.
signalName関数A flag's name, in English or Japanese: the letter and its word ("A: Alfa", "A旗(アルファ)"), the figure and its word, a substitute or the answering pennant.
signalsFor関数The flags that spell a text, one for each letter or figure and none for anything else (spaces, punctuation, letters outside A to Z): a hoist for a name or a number.

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

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