Reference · Options, materials, stacks and wear
cardMaterialfunction
The material with this id.
Import it
import { cardMaterial } from "@johnmorrisdotca/fuda-cards";
Definition
function cardMaterial(id: string | null | undefined): CardMaterial | undefined
Parameters
| Name | Type | Description |
|---|---|---|
id | string | null | undefined | A material's id, such as |
Returns
CardMaterial | undefined
The material, or undefined when there is none with that id (and for null and undefined).
Examples
import { cardMaterial } from "@johnmorrisdotca/fuda-cards";
console.log(cardMaterial("aluminium-0.8")?.thicknessMm); // 0.8
console.log(cardMaterial("nothing")); // undefined0.8
undefinedWhat it prints (run when this page was built)