UNPKG

@zsnout/ithkuil

Version:

A set of tools which can generate and parse romanized Ithkuil text and which can generate Ithkuil script from text and JSON data.

27 lines (26 loc) 992 B
import { deepFreeze } from "../../helpers/deep-freeze.js"; /** An array containing all modular adjunct types. */ export const ALL_MODULAR_ADJUNCT_TYPES = /* @__PURE__ */ deepFreeze(["WHOLE", "PARENT", "CONCAT"]); /** An object mapping from modular adjunct types to their Ithkuilic translations. */ export const MODULAR_ADJUNCT_TYPE_TO_ITHKUIL_MAP = /* @__PURE__ */ deepFreeze({ WHOLE: "", PARENT: "w", CONCAT: "y", }); /** An object mapping from modular adjunct types to what they apply to. */ export const MODULAR_ADJUNCT_TYPE_TO_DESCRIPTION_MAP = /* @__PURE__ */ deepFreeze({ WHOLE: "entire formative", PARENT: "parent formative only", CONCAT: "concatenated formative only", }); /** * Converts a modular adjunct type into Ithkuil. * * @param type The modular adjunct type to be converted. * @returns Romanized Ithkuilic text representing the type. */ export function modularAdjunctTypeToIthkuil(type) { return MODULAR_ADJUNCT_TYPE_TO_ITHKUIL_MAP[type]; }