• Reduce a name to a shortcode token: lowercased, ASCII-alphanumeric only (spaces and punctuation dropped). Used to suggest a default shortcode from an item's name. A name with no alphanumerics yields "" (the caller supplies a fallback).

    Parameters

    • name: string

      The source name.

    Returns string

    The slug token (possibly empty).