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

isSeedfunction

Whether a value read from outside (an address, a request body) is a seed: an integer from 1 to most.

Import it

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

Definition

function isSeed(value: unknown, most?: number): value is number

Parameters

NameTypeDescription
valueunknown

The unknown seed value to check.

most (optional)number

The largest seed admitted by the host.

Returns

boolean

Whether a value read from outside (an address, a request body) is a seed: an integer from 1 to most.

Examples

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

console.log(isSeed(42));
true

What it prints (run when this page was built)

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