ships.Function.inspectSlef - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / ships / inspectSlef

Function: inspectSlef()

inspectSlef(input): SlefInspection

Defined in: src/ships/slef.ts:476

Inspect a potentially mixed SLEF payload without silently losing malformed entries.

Parameters

input

unknown

A JSON string, SLEF envelope/array, or bare Loadout event.

Returns

SlefInspection

Every valid entry and an indexed diagnostic for every rejected entry.

Throws

If a string is not valid JSON.

Example

import { inspectSlef } from '@elite-dangerous-almanac/core/ships/slef';

const result = inspectSlef([{ Ship: 'sidewinder', Modules: [{ Slot: 'PowerPlant' }] }]);
result.diagnostics[0]?.path; // -> 'entries[0].Modules[0].Item'
⚠️ **GitHub.com Fallback** ⚠️