Reference · Load level collections
levelCountOffunction
How many levels a size has in a set; zero for a size the set has none at.
Import it
import { levelCountOf } from "@johnmorrisdotca/tsunagi/levels";
Also exported from: @johnmorrisdotca/tsunagi
Definition
function levelCountOf(size: number, set?: TsunagiSet): number
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
set (optional) | TsunagiSet | The native level set or palette specified by the signature. |
Returns
number
How many levels a size has in a set; zero for a size the set has none at.
Examples
import { levelCountOf } from "@johnmorrisdotca/tsunagi/levels";
console.log(levelCountOf(4));192What it prints (run when this page was built)