fromText関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A position from a line toText wrote, with any space around it. Null for anything else, or for a later format.
インポート
import { fromText } from "@johnmorrisdotca/tane";
定義
function fromText(text: string): StreamPosition | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | Text to hash, validate or decode. |
戻り値
StreamPosition | null
A position from a line toText wrote, with any space around it. null for anything else, or for a later format.
例
import { fromText, toText } from "@johnmorrisdotca/tane";
const position = { seed: 42, draws: 3 };
console.log(fromText(toText(position)));{ seed: 42, draws: 3 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。