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 · Streams, draws and seeds

toTextfunction

A position as one line to paste into a chat or a bug report: tane:1:42:7 is format 1, seed 42, 7 draws in.

Import it

import { toText } from "@johnmorrisdotca/tane";

Definition

function toText(position: StreamPosition): string

Parameters

NameTypeDescription
positionStreamPosition

The stream’s seed and nonnegative count of consumed draws.

Returns

string

A position as one line to paste into a chat or a bug report: tane:1:42:7 is format 1, seed 42, 7 draws in.

Examples

import { toText } from "@johnmorrisdotca/tane";

const position = { seed: 42, draws: 3 };
console.log(toText(position));
tane:1:42:3

What it prints (run when this page was built)

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