@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.
32 lines (31 loc) • 1 kB
JavaScript
import { deepFreeze } from "../../helpers/deep-freeze.js";
/** An array containing all suppletive adjunct types. */
export const ALL_SUPPLETIVE_ADJUNCT_TYPES =
/* @__PURE__ */ deepFreeze(["CAR", "QUO", "NAM", "PHR"]);
/**
* An object mapping from suppletive adjunct types to their Ithkuilic
* translations.
*/
export const SUPPLETIVE_ADJUNCT_TYPE_TO_ITHKUIL_MAP =
/* @__PURE__ */ deepFreeze({
CAR: "hl",
QUO: "hm",
NAM: "hn",
PHR: "hň",
});
/** An object mapping from suppletive adjunct types to their names. */
export const SUPPLETIVE_ADJUNCT_TYPE_TO_NAME_MAP = /* @__PURE__ */ deepFreeze({
CAR: "Carrier",
QUO: "Quotative",
NAM: "Naming",
PHR: "Phrasal",
});
/**
* Converts a suppletive adjunct type into Ithkuil.
*
* @param type The suppletive adjunct type to be converted.
* @returns Romanized Ithkuilic text representing the adjunct type.
*/
export function suppletiveAdjunctTypeToIthkuil(type) {
return SUPPLETIVE_ADJUNCT_TYPE_TO_ITHKUIL_MAP[type];
}