astro.Function.permitLockedSystemForAddress - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / astro / permitLockedSystemForAddress

Function: permitLockedSystemForAddress()

permitLockedSystemForAddress(address): PermitLockedSystem | null

Defined in: src/astro/permit-locked-systems.ts:98

Find an individually permit-locked system by its system address.

Parameters

address

SystemAddressInput

A bigint from this library, a safe integer from a normally parsed journal event, or a decimal string from persisted JSON. Unsafe numbers, non-integers and malformed strings yield null rather than risking a rounded address comparison.

Returns

PermitLockedSystem | null

The frozen catalogue record, or null when the address is invalid or not individually permit-locked.

Example

import { permitLockedSystemForAddress } from '@elite-dangerous-almanac/core/astro/permit-locked-systems';

declare const event: { SystemAddress: number }; // an `FSDJump` line, parsed

permitLockedSystemForAddress(event.SystemAddress)?.name; // -> 'Sol'
permitLockedSystemForAddress('10477373803')?.name;       // -> 'Sol'
⚠️ **GitHub.com Fallback** ⚠️