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
| Name | Type | Description |
|---|---|---|
value | unknown | 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));trueWhat it prints (run when this page was built)