Skip to the content

Tane種

Reproduce numbers from a seed, shuffle or pick items, share a daily puzzle and resume a saved stream.

Tane means seed in Japanese. About the name

Contents

Reference

Register the picker

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

4.3 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
definePickerfunctionDefines the picker or a subclass under a host's tag; safe on a server.
parsePickerItemsfunctionReads a bounded list, one item per line or a JSON string array.
TANE_EMBED_OPTION_KEYSconstantActual host option keys, checked by the builder.
TanePickDetailtypeNative event detail: list indices instead of names or other item text.
TanePickerclassA seeded item picker and group maker, using the native random and draw functions.
TanePickerModetypeThe picker modes: sample without replacement, shuffled list or balanced groups.
TanePickerOptionstypeHost data, a native random stream, optional weights and a result callback.

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tane 1.3.0.