Reference · Rolls and exact odds
checkNotationfunction
A spec from notation, or which part of the text was refused and why. Never a roll of something else.
Import it
import { checkNotation } from "@johnmorrisdotca/korokoro";
Definition
function checkNotation(text: string, options?: NotationOptions): NotationCheck
Parameters
| Name | Type | Description |
|---|---|---|
text | string | Text to parse, validate or format. |
options (optional) | NotationOptions | Options for this call; omitted fields keep their documented defaults. |
Returns
NotationCheck
A spec from notation, or which part of the text was refused and why. Never a roll of something else.
Examples
import { checkNotation } from "@johnmorrisdotca/korokoro";
console.log(checkNotation("not dice"));{
ok: false,
problem: 'shape',
part: 'not dice',
message: '“not dice”: this is not dice notation'
}What it prints (run when this page was built)