Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/checkFilename"

Index

Functions

Functions

Const checkFilename

  • checkFilename(filename: string, url: string): string
  • Checks if the provided filename contains a file extension If it doesn't, tries to guess the extension from the provided URL and appends it to the filename

    Parameters

    • filename: string

      The filename to be checked

    • url: string

      The URL to guess the file extension

    Returns string

    Returns either the original filename (if it already contains a file extension) or the filename.extension

Generated using TypeDoc