materials.Function.microResourcesInCategory - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / materials / microResourcesInCategory
microResourcesInCategory(
category):MicroResource[]
Defined in: src/materials/micro-resources.ts:178
Every micro resource in a given category, in catalogue order.
string
The category to match, e.g. 'component'. Leading/trailing
whitespace and case are ignored, like every other lookup here.
A new array of matches (possibly empty).
If category is present and not a string. A nullish
category is a miss, answered the way an unrecognised one is.
import { microResourcesInCategory } from '@elite-dangerous-almanac/core/materials/micro-resources';
microResourcesInCategory('consumable')[0]?.name; // -> 'Medkit'
microResourcesInCategory('Consumable')[0]?.name; // -> 'Medkit'; case is ignored