Reference · Eight puzzle-rule namespaces
wordKeyfunction
The key a game's words are kept under: its id with underscores for hyphens (game_tube_sort, rules_tube_sort).
Import it
import { wordKey } from "@johnmorrisdotca/karakuri";
Definition
function wordKey(game: string): string
Parameters
| Name | Type | Description |
|---|---|---|
game | string | One of the native KARAKURI_GAME_IDS. |
Returns
string
The key a game's words are kept under: its id with underscores for hyphens (game_tube_sort, rules_tube_sort).
Examples
import { wordKey } from "@johnmorrisdotca/karakuri";
console.log(wordKey("tube-sort"));tube_sortWhat it prints (run when this page was built)