API Docs
    Preparing search index...

    Function trim

    • Internal

      Trims matching characters from both ends of a string. Used primarily for removing quotes from attribute values.

      Parameters

      • str: string | undefined

        The string to trim, or undefined

      • char: string

        The character to strip from both ends

      Returns string | undefined

      The trimmed string, or undefined if input was undefined

      trim('"hello"', '"'); // "hello"
      trim(undefined, '"'); // undefined