Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Interfaces

Variables

Functions

Variables

Const charsets

charsets: Charsets

Const default_type

default_type: string

Functions

define

  • Parameters

    Returns void

extension

  • extension(mime: string): string | undefined
  • Return a file extensions associated with a mime type.

    Parameters

    • mime: string

    Returns string | undefined

load

  • load(filepath: string): void
  • Load an Apache2-style ".types" file.

    Parameters

    • filepath: string

    Returns void

lookup

  • lookup(path: string, fallback?: string): string
  • Look up a mime type based on extension.

    If not found, uses the fallback argument if provided, and otherwise uses default_type.

    Parameters

    • path: string
    • Optional fallback: string

    Returns string