@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.
20 lines (19 loc) • 641 B
JavaScript
import { deepFreeze } from "../helpers/deep-freeze.js";
/** An object mapping from specifications (in referentials) to Ithkuil. */
export const REFERENTIAL_SPECIFICATION_TO_ITHKUIL_MAP =
/* @__PURE__ */ deepFreeze({
BSC: "x",
CTE: "xt",
CSV: "xp",
OBJ: "xx",
});
/**
* Converts a specification (in a referential) into Ithkuil.
*
* @param specification The specification to be converted.
* @returns Romanized Ithkuilic text representing the specification (in a
* referential).
*/
export function referentialSpecificationToIthkuil(specification) {
return REFERENTIAL_SPECIFICATION_TO_ITHKUIL_MAP[specification];
}