@ironarachne/words
    Preparing search index...

    Function article

    • article(word: string, appendWord?: boolean): string

      Returns the correct article ("a" or "an") for a given word based on its first letter.

      Note: the choice is based on spelling, so it can be wrong for words whose pronunciation differs from their spelling (e.g. "a unicorn", "an MBA", "a one").

      Parameters

      • word: string

        The word to get the article for.

      • appendWord: boolean = false

        Whether or not to append the word to the article.

      Returns string

      The article for the given word.