@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.
26 lines (25 loc) • 776 B
JavaScript
import { deepFreeze } from "../helpers/deep-freeze.js";
/** An array containing all parsing adjuncts. */
export const ALL_PARSING_ADJUNCTS =
/* @__PURE__ */ deepFreeze([
"monosyllabic",
"ultimate",
"penultimate",
"antepenultimate",
]);
/** An object mapping from parsing adjuncts to their Ithkuilic translations. */
export const PARSING_ADJUNCT_TO_ITHKUIL_MAP = /* @__PURE__ */ deepFreeze({
monosyllabic: "a'",
ultimate: "e'",
penultimate: "o'",
antepenultimate: "u'",
});
/**
* Converts a parsing adjunct into Ithkuil.
*
* @param adjunct The adjunct to be converted.
* @returns Romanized Ithkuilic text representing the adjunct.
*/
export function parsingAdjunctToIthkuil(adjunct) {
return PARSING_ADJUNCT_TO_ITHKUIL_MAP[adjunct];
}