リファレンス
名前の一覧の小さな最初のかたまり (固有名のある335個の星と110個のメシエ天体。全体と同じ行で、最初に約20 kBだけ読み込む検索ボックス用)
import { … } from "@johnmorrisdotca/hoshi-stars/names/named";
最小化と gzip 圧縮をしたサイズは 22.7 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
deepSkyRow | 関数 | The row of a deep-sky object. |
findName | 関数 | The row of the small chunk that a name, a designation or an id names exactly, ignoring case, spacing, accents and the Greek letter's spelling (Betelgeuse, alpha Ori, HR 2061, M31, NGC 224, ベテルギウス), or undefined. |
NAME_KINDS | 定数 | The kinds of row in the names index: star, cluster (open and globular), nebula (emission, reflection, planetary, supernova remnant), galaxy and other (an asterism, a double star Messier listed, a source that is none of those). |
nameIndex | 関数 | An index over rows: by id, by exact name and by a ranked search. |
NameIndex | 型 | What an index of rows offers: the rows, one by id, one by any name, and a ranked search. |
nameKey | 関数 | A text folded to compare, as findName does: lower case, no accents, Greek letters spelt out and one space, a superscript as its digit; M 31, Messier 31 and m31 give m31, NGC 0224 gives ngc224, HR 2061 and hr2061 give hr2061. |
NameKind | 型 | One kind of row: star, cluster, nebula, galaxy or other. |
NameRow | 型 | One row of the names index: a star or a deep-sky object with the names a search box would try, and where to turn the sky to it. |
nameRowById | 関数 | One row of the small chunk by its id (betelgeuse, m31): the same row /names gives for that id; undefined for a star without a common name (alpha-centauri, hr-1234), which is in /names. |
nameRows | 関数 | The rows of the small chunk: the 335 stars with a common name and the 110 Messier objects (445), brightest and best-known first (by weight), as a fresh array. |
searchNames | 関数 | The rows of the small chunk whose names match what was typed: those with a name that starts with it first (an exact name before those), then those that contain it, each by weight. |
slugOf | 関数 | An address-safe id from a text: lower-case ASCII letters and digits in runs joined by one hyphen; an accent is dropped (Boötes gives bootes) and a Greek letter is spelt out (α1 Centauri gives alpha1-centauri). |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。