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

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

Function: permitLockedRegionForSystemName()

permitLockedRegionForSystemName(systemName): string | null

Defined in: src/astro/permit-locked-regions.ts:67

Find the permit-locked region prefix applying to a system name.

Parameters

systemName

string

A system name in any casing, with optional surrounding whitespace.

Returns

string | null

The canonically-cased region name, or null when no locked region prefix applies.

Throws

If systemName is present and not a string. A nullish systemName is a miss, answered the way an unrecognised one is.

Example

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

permitLockedRegionForSystemName('Col 70 Sector AA-D b17-0');
// -> 'Col 70 Sector'
⚠️ **GitHub.com Fallback** ⚠️