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.

47 lines (46 loc) 1.09 kB
import { deepFreeze } from "../../helpers/deep-freeze.js"; /** An array containing all phases. */ export const ALL_PHASES = /* @__PURE__ */ deepFreeze([ "PUN", "ITR", "REP", "ITM", "RCT", "FRE", "FRG", "VAC", "FLC", ]); /** An object mapping phases to their Ithkuilic translations. */ export const PHASE_TO_ITHKUIL_MAP = /* @__PURE__ */ deepFreeze({ PUN: "ai", ITR: "au", REP: "ei", ITM: "eu", RCT: "ëu", FRE: "ou", FRG: "oi", VAC: "iu", FLC: "ui", }); /** An object mapping phases to their names. */ export const PHASE_TO_NAME_MAP = /* @__PURE__ */ deepFreeze({ PUN: "Punctual", ITR: "Iterative", REP: "Repetitive", ITM: "Intermittent", RCT: "Recurrent", FRE: "Frequentative", FRG: "Fragmentative", VAC: "Vacillitative", FLC: "Fluctuative", }); /** * Converts a phase into Ithkuil. * * @param phase The phase to be converted. * @returns Romanized Ithkuilic text representing the phase. */ export function phaseToIthkuil(phase) { return PHASE_TO_ITHKUIL_MAP[phase]; }