getLevelfunction
Looks a level up by its id or its display number; null where there is none.
Import it
import { getLevel } from "@johnmorrisdotca/houseki/tsumiki";
Definition
function getLevel(idOrNumber: string | number): TsumikiLevel | null
Parameters
| Name | Type | Description |
|---|---|---|
idOrNumber | string | number | A level's id or display number. |
Returns
TsumikiLevel | null
The level, or null where there is no such level.
Examples
import { getLevel } from "@johnmorrisdotca/houseki/tsumiki";
console.log(getLevel(1)?.number);1What it prints (run when this page was built)