readSolveLink関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A solve read out of a link to alg.cubing.net, the page most reconstructions
are shared by, so that a person can paste the address and not copy two
boxes by hand. In such a link a space is written _, a ' is written -
and a new line %0A; the scramble is its setup and the solve its alg.
Null for anything that is not such a link.
インポート
import { readSolveLink } from "@johnmorrisdotca/kyuubu";
定義
function readSolveLink(text: string): SolveLink | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | The text to parse or format. |
戻り値
SolveLink | null
A solve read out of a link to alg.cubing.net, the page most reconstructions are shared by, so that a person can paste the address and not copy two boxes by hand. In such a link a space is written _, a ' is written - and a new line %0A; the scramble is its setup and the solve its alg. null for anything that is not such a link.
例
import { readSolveLink } from "@johnmorrisdotca/kyuubu";
console.log(readSolveLink("https://alg.cubing.net/?setup=R_U&alg=U-_R-"));{ scramble: 'R U', solution: "U' R'" }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。