@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.
37 lines (36 loc) • 1.19 kB
JavaScript
import { deepFreeze } from "../../helpers/deep-freeze.js";
/** An array containing all modular adjunct scopes. */
export const ALL_MODULAR_ADJUNCT_SCOPES =
/* @__PURE__ */ deepFreeze([
"CASE/MOOD+ILL/VAL",
"CASE/MOOD",
"FORMATIVE",
"ADJACENT",
]);
/**
* An object mapping from modular adjunct scopes to their Ithkuilic
* translations.
*/
export const MODULAR_ADJUNCT_SCOPE_TO_ITHKUIL_MAP = /* @__PURE__ */ deepFreeze({
"CASE/MOOD+ILL/VAL": "a",
"CASE/MOOD": "e",
FORMATIVE: "i",
ADJACENT: "o",
});
/** An object mapping from modular adjunct scopes to what they have scope over. */
export const MODULAR_ADJUNCT_SCOPE_TO_DESCRIPTION_MAP =
/* @__PURE__ */ deepFreeze({
"CASE/MOOD+ILL/VAL": "Case/Mood and Validation + Illocution",
"CASE/MOOD": "Case/Mood",
FORMATIVE: "the formative as a whole",
ADJACENT: "the formative and adjacent adjuncts",
});
/**
* Converts a modular adjunct scope into Ithkuil.
*
* @param scope The modular adjunct scope to be converted.
* @returns Romanized Ithkuilic text representing the adjunct.
*/
export function modularAdjunctScopeToIthkuil(scope) {
return MODULAR_ADJUNCT_SCOPE_TO_ITHKUIL_MAP[scope];
}