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

dayOfSeedfunction

The day a seed names inside a block, or null for a seed that names none. The inverse of daySeed.

Import it

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

Definition

function dayOfSeed(seed: number, block: SeedBlock): DayKey | null

Parameters

NameTypeDescription
seednumber

The numeric seed, read as an unsigned 32-bit integer by the stream.

blockSeedBlock

The reserved seed block: its starting seed and length.

Returns

string | null

The day a seed names inside a block, or null for a seed that names none. The inverse of daySeed.

Examples

import { dayOfSeed, daySeed } from "@johnmorrisdotca/tane";

const block = { from: 1000000000, size: 100000000 };
console.log(dayOfSeed(daySeed("2026-10-11", block), block));
2026-10-11

What it prints (run when this page was built)

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