wearLevels関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The levels a card's wear asks for: the grade's or the number's, with any level named on its own laid over them.
インポート
import { wearLevels } from "@johnmorrisdotca/fuda-cards";
定義
function wearLevels(options: WearOptions): WearLevels | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
options | WearOptions | The wear asked for: a grade or a number from 0 to 1, and levels of corners, edges, surface and creases. |
戻り値
WearLevels | null
The levels, or null when the card asks for none: no wear, "perfect", an unknown name or every level zero.
例
import { wearLevels } from "@johnmorrisdotca/fuda-cards";
console.log(wearLevels({ wear: "perfect" })); // null
console.log(wearLevels({ wear: 0.5 })?.surface); // 0.5null
0.5出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。