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

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

Function: canonicalizeSystemName()

canonicalizeSystemName(name): string | null

Defined in: src/astro/system-name.ts:246

Fix the casing of a system name. Procedural regions are round-tripped through the grid; catalogued hand-authored regions are looked up case-insensitively. Unknown region strings are left untouched so syntactic parsing remains separate from address encodability.

Parameters

name

string

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

Returns

string | null

The canonically-cased name, or null if it is not a system name — including a nullish name, which parseSystemName tolerates on this path too.

Throws

If name is present and not a string.

⚠️ **GitHub.com Fallback** ⚠️