paceFromAttributefunction
A pace from an attribute: a name, or seconds. Anything else is left to the default.
Import it
import { paceFromAttribute } from "@johnmorrisdotca/kyuubu/element";
Definition
function paceFromAttribute(value: string | null): number | ScramblePace | undefined
Parameters
| Name | Type | Description |
|---|---|---|
value | string | null | The attribute or candidate value to validate. |
Returns
number | "fast" | "normal" | "slow" | undefined
The pace name or positive seconds value, or undefined to use the default pace.
Examples
import { paceFromAttribute } from "@johnmorrisdotca/kyuubu/element";
console.log(paceFromAttribute("slow"));slowWhat it prints (run when this page was built)