Reference · Rules, games and records
isVariantKeyfunction
Whether key names a variant.
Import it
import { isVariantKey } from "@johnmorrisdotca/sugoroku";
Definition
function isVariantKey(key: unknown): key is VariantKey
Parameters
| Name | Type | Description |
|---|---|---|
key | unknown | The native variant, preset or localized-label key specified by the signature. |
Returns
boolean
Whether key names a variant.
Examples
import { isVariantKey } from "@johnmorrisdotca/sugoroku";
console.log(isVariantKey("tabula"));trueWhat it prints (run when this page was built)