Saxonberg Server API
    Preparing search index...
    Index

    Constructors

    Properties

    ARTICLES: ReadonlySet<string> = ARTICLES

    Articles stripped from the head of a query during MQL desugar. Lowercase entries; comparisons are case-insensitive and done by the consumer.

    ORDINAL_NUMERIC: RegExp = ORDINAL_NUMERIC

    Numeric-suffix ordinal pattern. Matches 1st, 2nd, 3rd, 4th, … Group 1 is the integer.

    ORDINAL_WORDS: ReadonlyMap<string, number> = ORDINAL_WORDS

    Word-form ordinal markers (ORDINAL_WORDS). Maps first → 1, second → 2, … last → -1 (per the negative-index convention from req §6).

    Methods

    Staticarticle

    • Indefinite article ('a' / 'an') for a raw word or phrase by vowel onset — the string-level core of article. Not phonetic (a unicorn / an honest need per-stuff overrides).

      Parameters

      • text: string

      Returns string

    • Capitalize the first character. Operates on raw strings only — passing a markup fragment will cap the leading <, which is almost certainly not what the author wants. The common sentence-leading uses (pronoun, article, possessive) all return raw strings, so this composes cleanly there.

      Parameters

      • text: string

      Returns string

    • Render a list of strings in English serial-comma form: [] → '' ['a'] → 'a' ['a', 'b'] → 'a and b' ['a', 'b', 'c'] → 'a, b, and c' ['a', 'b', 'c', 'd'] → 'a, b, c, and d'

      Oxford-comma style — consistent with the rest of the project's authored prose. For non-list joining (CSV, tags) callers should use Array.join directly; this method exists for natural-prose sentences ("Added Iffy, Bobalu, and Jane to your friends list.").

      Parameters

      • items: readonly string[]

      Returns string

    • Plural form of singular.

      Defers to the host's getPluralForm() method when present so irregulars (mousemice, childchildren) can override the rule. Falls back to the naive singular + 's' — good enough for English-content v1. Real morphology (-y → -ies, -s/-x/-z /-ch/-sh → -es, etc.) lands when a Locale or richer pluralization rule arrives.

      The host-side opt-in shape is a single getPluralForm(): string method on the Stuff. Empty / non-string returns fall through to the naive rule so a misbehaving override doesn't crash the caller.

      Parameters

      • stuff: Stuff
      • singular: string

      Returns string

    • Split text into lowercase word atoms — on runs of non-alphanumerics, dropping articles (a / an / the) and single characters. "a tall stranger"['tall', 'stranger']; "Bob"['bob']. Used for keyword derivation from a rendered/perceived name.

      Parameters

      • text: string

      Returns string[]