findPresets関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The presets a search finds: every word typed has to be in the name, another name, the one-line description or the notation. An empty search finds them all.
インポート
import { findPresets } from "@johnmorrisdotca/korokoro";
定義
function findPresets(search: string): Preset[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
search | string | Text to match against preset ids, names and aliases. |
戻り値
Preset[]
The presets a search finds: every word typed has to be in the name, another name, the one-line description or the notation. An empty search finds them all.
例
import { findPresets } from "@johnmorrisdotca/korokoro";
console.log(findPresets("yahtzee").map((preset) => preset.id));[ 'yahtzee' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。