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.

18 lines (17 loc) 554 B
import { affixToIthkuil } from "../../affix/index.js"; import { EMPTY, WithWYAlternative } from "../../helpers/with-wy-alternative.js"; /** * Converts Slot VII into Ithkuil. * * @param slot The Slot VII affixes of the formative. * @returns A `WithWYAlternative` containing romanized Ithkuilic text * representing Slot VII. */ export function slotVIIToIthkuil(slot) { if (slot.length == 0) { return EMPTY; } return slot .map((affix) => affixToIthkuil(affix, { reversed: false })) .reduce((a, b) => a.add(b)); }