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

StreamPositiontype

Where a stream is: the seed it started from, and how many numbers have been drawn from it.

Import it

import type { StreamPosition } from "@johnmorrisdotca/tane";

Definition

type StreamPosition = {
    readonly seed: number;
    readonly draws: number;
};

Members

NameTypeDescription
seednumber

The seed the stream was made from, as an unsigned 32-bit integer.

drawsnumber

How many numbers have been drawn: 0 for a stream nothing has been taken from.

Examples

import type { StreamPosition } from "@johnmorrisdotca/tane";

const value: StreamPosition = { seed: 42, draws: 3 };
console.log(value.draws);
3

What it prints (run when this page was built)

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