Skip to Content
Mika Scraper 1.1.1 is released ๐ŸŽ‰
๐Ÿฉ MIKA TYPE ALIASType Alias: categoryMap

Type Alias: categoryMap

categoryMap = Record<McpedlCategory, string>

Defined in: src/mcpedl-search/mcpedl.ts:21

The categoryMap type alias is a utility type that maps user-friendly category keys, represented by the McpedlCategory enum, to the corresponding URL slugs used in the mcpedl.org website. This structure facilitates the integration of human-readable categories with their web counterparts, streamlining any operations that involve fetching or processing data based on category selections.

Usage

The categoryMap type alias can be used to define objects that link each category to its corresponding URL string, enhancing code clarity and ensuring that the mappings are accurately tracked and maintained.

Example

const categories: categoryMap = { "Building": "building-slug", "Survival": "survival-slug", "Adventure": "adventure-slug", "Puzzle": "puzzle-slug", // Add other categories as necessary };

This example illustrates a typical implementation of the categoryMap, where each key represents a McpedlCategory and its value is the associated URL slug.

Last updated on