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
| Name | Type | Description |
|---|---|---|
position | StreamPosition | 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:3What it prints (run when this page was built)