astro.Function.isProceduralSystemName - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / astro / isProceduralSystemName
isProceduralSystemName(
name,options?):boolean
Defined in: src/astro/system-name.ts:289
Whether a string is a well-formed procedural system name.
string
The candidate name, in any casing and with optional surrounding whitespace.
IsProceduralSystemNameOptions = {}
See IsProceduralSystemNameOptions.
boolean
true when the name parses as a procedural system name. A hand-named
system (Sol, Maia) is false: it is a real system, just not a procedural name. A
nullish name is false as well, matching parseSystemName's tolerance.
If name is present and not a string.
import { isProceduralSystemName } from '@elite-dangerous-almanac/core/astro/system-name';
isProceduralSystemName('Blae Eock KC-C d0'); // -> true
isProceduralSystemName(' Blae Eock KC-C d0\n'); // -> true
isProceduralSystemName('Pleiades Sector HR-W d1-79'); // -> true
isProceduralSystemName('Pleiades Sector HR-W d1-79', { strict: true }); // -> false