Module: enums

Enums (and a few enum related helper methods and constsants) used by FediAlgo.

Members

(static) isCacheKey

True if argument is a member of CacheKey.

(static) isFediverseCacheKey

True if argument is a member of FediverseCacheKey.

(static) isNonScoreWeightName

True if argument is a member of NonScoreWeightName enum.

(static) isScoreName

True if argument is a member of ScoreName enum.

(static) isTagTootsCategory

True if argument is a member of TagTootsCacheKey.

(static) isTypeFilterName

True if argument is a member of TypeFilterName enum.

(inner) BooleanFilterName :string

Enum of boolean filter names for filtering toots by property.
Type:
  • string

(inner) MediaCategory :string

Enum of Mastodon API media category strings.
Type:
  • string

(inner) NonScoreWeightName :string

Enum of non-score weight names (used for sliders and scoring adjustments). NOTE: Order influences the order of the score weighting sliders in the demo app.
Type:
  • string

(inner) ScoreName :string

Enum of all scoring categories for which there is a scorer. Also Used for UI display and filtering.
Type:
  • string

(inner) TagTootsCategory :string

Enum of categories of toots pulled for a type of tag (favourited/particated/trending).
Type:
  • string

(inner) TrendingType :string

Enum of trending data types that can be fetched from the API. *
Type:
  • string

(inner) TypeFilterName :string

Enum of type filter names for filtering toots by type (e.g., audio, bot, images, etc.). The values have spaces for better presentation in the demo app.
Type:
  • string

Methods

(inner) isApiCacheKey()

True if argument is an ApiCacheKey.

(inner) isValueInStringEnum(strEnum) → {function}

Generate a function to check if a value exists in a string enum.
Parameters:
Name Type Description
strEnum Record.<string, E> The enum object.
Returns:
The checker function.
Type
function

(inner) isWeightName()

True if argument is a member of ScoreName or NonScoreWeightName enums.