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

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

Function: isPermitLockedSystemName()

isPermitLockedSystemName(name): boolean

Defined in: src/astro/permit-locks.ts:153

Whether a system needs a permit — either its own, or its region's.

A convenience wrapper over permitLockForSystemName for when you only need the yes/no. Use that function instead when you want to tell the commander which permit they are missing.

Parameters

name

string

A system name in any casing, with optional surrounding whitespace, e.g. "vega".

Returns

boolean

true if the name matches a permit-locked system or region.

Throws

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

Example

import { isPermitLockedSystemName } from '@elite-dangerous-almanac/core/astro/permit-locks';

isPermitLockedSystemName('Sirius');                 // -> true  (system lock)
isPermitLockedSystemName('Cone Sector GW-W c1-5');  // -> true  (region lock)
isPermitLockedSystemName('Colonia');                // -> false
⚠️ **GitHub.com Fallback** ⚠️