• Get the media type based on the extension of the given path, which can be an URL or file path.

    Parameters

    • path: string

      A path.

    • OptionalmediaMappings: Record<string, string>

      A collection of mappings, mapping file extensions to their corresponding media type.

    Returns string

    A media type or the empty string.