本文へ移動

Tane種

シードで同じ数列を再現し、項目を並べ替えたり選んだり、日替わりの問題を共有したり、保存した位置から再開したりできます。

「種」は英語の seed に当たる日本語です。 名前について(英語)

目次

リファレンス

選択ツールの要素

import { … } from "@johnmorrisdotca/tane/element";

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

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

エクスポート

名前種類概要
definePicker関数Defines the picker or a subclass under a host's tag; safe on a server.
parsePickerItems関数Reads a bounded list, one item per line or a JSON string array.
TANE_EMBED_OPTION_KEYS定数Actual host option keys, checked by the builder.
TanePickDetail型Native event detail: list indices instead of names or other item text.
TanePickerクラスA seeded item picker and group maker, using the native random and draw functions.
TanePickerMode型The picker modes: sample without replacement, shuffled list or balanced groups.
TanePickerOptions型Host data, a native random stream, optional weights and a result callback.

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

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