Options
All
  • Public
  • Public/Protected
  • All
Menu

This namespace includes helper functions that are accessible when writing an adaptor.

Index

Functions

getModeFromExtension

  • getModeFromExtension(filename: any, customRules?: {}): string
  • The default rules used for mapping the extension to the mode is :

    {
    '.ts': 'javascript',
    '.js': 'javascript',
    '.html': 'html',
    '.xml': 'xml',
    '.css': 'css',
    '.py': 'python',
    }
    

    Parameters

    • filename: any

      the name of the file

    • customRules: {} = ...

      user defined additional rules to use (may override default ones)

      • [key: string]: string

    Returns string

    the corresponding mode with repect to the file extension, or 'none' if no correspondance found

Generated using TypeDoc