equipment.Function.getPersonalToolById - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / equipment / getPersonalToolById

Function: getPersonalToolById()

getPersonalToolById(id): PersonalTool | null

Defined in: src/equipment/tools.ts:111

Look up a suit tool by its library id, case-insensitively.

Parameters

id

string

Library id such as "energylink", matched case-insensitively after trimming surrounding whitespace.

Returns

PersonalTool | null

The frozen tool record, or null when unknown.

Throws

If id is present and not a string. A nullish id is a miss, answered like an unrecognised one.

Example

import { getPersonalToolById } from '@elite-dangerous-almanac/core/equipment/tools';
getPersonalToolById('arc-cutter')?.suitFamilies; // -> ['utilitysuit']
⚠️ **GitHub.com Fallback** ⚠️