Skip to content

locationLogic.ts

github-actions[bot] edited this page Oct 1, 2023 · 6 revisions

Functions

planetMoon([moon])string

Returns the type of celestial body based on whether a moon is present or not.

planetMoonSentence([planet], [moon], [link])string

Sets the text content of globalElements.output.celestialBody to a sentence describing the input planet and moon. If globalElements.output.celestialBody is falsy, returns the description string.

getRegNumber(regionName)number | string

Returns the region number of a region.

regNr(regionName)string

Returns the sentence part for the location section including the region number.

planetMoon([moon]) ⇒ string

Returns the type of celestial body based on whether a moon is present or not.

Kind: global function
Returns: string -

  • A string indicating whether the celestial body is a moon or planet.
Param Type Default Description
[moon] boolean pageData.moon

A boolean indicating whether a moon is present.

planetMoonSentence([planet], [moon], [link]) ⇒ string

Sets the text content of globalElements.output.celestialBody to a sentence describing the input planet and moon. If globalElements.output.celestialBody is falsy, returns the description string.

Kind: global function
Returns: string -

  • The description sentence, or "" if globalElements.output.celestialBody is falsy.
Param Type Default Description
[planet] string "pageData.planet"

The name of the planet to describe.

[moon] string "pageData.moon"

The name of the moon to describe.

[link] boolean false

Whether to link the word "planet".

getRegNumber(regionName) ⇒ number | string

Returns the region number of a region.

Kind: global function
Returns: number | string -

The region number of the region.

Param Type Description
regionName string

The name of the region.

regNr(regionName) ⇒ string

Returns the sentence part for the location section including the region number.

Kind: global function
Returns: string -

  • The sentence part for the location section including the region number
Param Type Description
regionName string

The name of the region

Clone this wiki locally