Skip to the content

Houseki宝石

Run five native gem and stone engines, play measured challenges and lessons, and save deterministic games.

Houseki (宝石) is Japanese for a gem or precious stone. About the name

Contents

Reference · Colour Chains

getLevelfunction

Find a campaign challenge by stable content ID or its current one-based number.

Import it

import { getLevel } from "@johnmorrisdotca/houseki/colour-chains";

Definition

function getLevel(id: string | number): ChainCampaignLevel | undefined

Parameters

NameTypeDescription
idstring | number

A stable content id, or the one-based display number when numbers are accepted.

Returns

ChainCampaignLevel | undefined

Find a campaign challenge by stable content ID or its current one-based number. Returns undefined when the id or display number is absent.

Examples

import { getLevel } from "@johnmorrisdotca/houseki/colour-chains";

console.log(getLevel(1)?.id);
chains-64c3d1d92e2f

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/houseki 0.4.2.