Function matchesMediaType

  • Checks if the given two media types/ranges match each other. Takes wildcards into account.

    Parameters

    • mediaA: string

      Media type to match.

    • mediaB: string

      Media type to match.

    Returns boolean

    True if the media type patterns can match each other.