Reference · Rolls and exact odds
setQueryfunction
A set as a link's query: the dice and the name, for anybody to open and keep.
Import it
import { setQuery } from "@johnmorrisdotca/korokoro";
Definition
function setQuery(set: DiceSet): string
Parameters
| Name | Type | Description |
|---|---|---|
set | DiceSet | The saved set to add or share. |
Returns
string
A set as a link's query: the dice and the name, for anybody to open and keep.
Examples
import { setQuery } from "@johnmorrisdotca/korokoro";
import { makeSet } from "@johnmorrisdotca/korokoro";
const set = makeSet("Longsword", "1d8+3")!;
console.log(setQuery(set));dice=1d8%2B3&name=Longsword&v=2What it prints (run when this page was built)