EU Parliament Monitor — API Documentation - v0.9.28
    Preparing search index...
    • Decide whether clippedTitle is usable as the resolved title candidate. Extracted from resolveOneLanguage to keep cognitive complexity under the SonarJS threshold (15).

      Parameters

      • args: {
            clippedTitle: string;
            headlineWasContaminated: boolean;
            nonLatinFamily: boolean;
            allowShortResolvedTitle: boolean;
            lang: LanguageCode;
        }

        Title candidate inputs

        • clippedTitle: string

          The truncated editorial/manifest title to evaluate

        • headlineWasContaminated: boolean

          True when the editorial headline was rejected by sanitize

        • nonLatinFamily: boolean

          True for CJK/RTL locales requiring locale-script glyphs

        • allowShortResolvedTitle: boolean

          True when the source is a localized brief

        • lang: LanguageCode

          Target language code

      Returns string

      The clipped title when usable, '' otherwise