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

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

Function: getCodexRegionByName()

getCodexRegionByName(name): CodexRegion | null

Defined in: src/astro/codex-region.ts:171

Look up a region by name (case-insensitive).

Parameters

name

string

The region name, e.g. "Inner Orion Spur". Matching ignores case and surrounding whitespace.

Returns

CodexRegion | null

The CodexRegion, or null if no region has that name.

Throws

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

Example

import { getCodexRegionByName } from '@elite-dangerous-almanac/core/astro/codex-region';

getCodexRegionByName('the void')?.id; // -> 42
⚠️ **GitHub.com Fallback** ⚠️