Reference · Rules, generation and deductions
levelNamedfunction
The level a name means, or null. Accepts easy, medium, hard and extra-hard (also written extra hard,
extra_hard or extraHard, in any case), and the older beginner, intermediate and expert.
Import it
import { levelNamed } from "@johnmorrisdotca/jirai";
Definition
function levelNamed(name: unknown): Level | null
Parameters
| Name | Type | Description |
|---|---|---|
name | unknown | A candidate native level name or legacy alias. |
Returns
Level | null
The canonical native level, or null for an unknown name.
Examples
import { levelNamed } from "@johnmorrisdotca/jirai";
console.log(levelNamed("beginner"));easyWhat it prints (run when this page was built)