oag-mcp
    Preparing search index...

    Function trimTrailingSlashes

    • Remove every trailing / from a string.

      A loop rather than s.replace(//+$/, ""): that regex retries from every / in a run that is not at the end, so a long run of slashes followed by anything else takes quadratic time.

      Parameters

      • s: string

        URL, path or path template

      Returns string

      the string without trailing slashes