Reference · Options, materials, stacks and wear
wearLevelsfunction
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 it
import { wearLevels } from "@johnmorrisdotca/fuda-cards";
Definition
function wearLevels(options: WearOptions): WearLevels | null
Parameters
| Name | Type | Description |
|---|---|---|
options | WearOptions | The wear asked for: a grade or a number from 0 to 1, and levels of corners, edges, surface and creases. |
Returns
WearLevels | null
The levels, or null when the card asks for none: no wear, "perfect", an unknown name or every level zero.
Examples
import { wearLevels } from "@johnmorrisdotca/fuda-cards";
console.log(wearLevels({ wear: "perfect" })); // null
console.log(wearLevels({ wear: 0.5 })?.surface); // 0.5null
0.5What it prints (run when this page was built)