Skip to main content

TransformFormat

TransformFormat

Index

Constructors

constructor

Methods

staticaddFormat

  • addFormat(format: any): void
  • Adds a formatter to the static Map by type: format.type.


    Parameters

    • format: any

      An instance of an object conforming to the module / project transform format API.

    Returns void

staticforEach

  • forEach(callback: any, thisArg?: any): void
  • Invokes the callback for each stored formatter.


    Parameters

    • callback: any

      A callback function.

    • optionalthisArg: any

      (Optional) this context.

    Returns void

staticforEachExt

  • forEachExt(extension: string, callback: any, thisArg?: any): void
  • Provides a forEach variation that invokes the callback if the given extension matches that of a stored formatter.


    Parameters

    • extension: string

      A format extension.

    • callback: any

      A callback function.

    • optionalthisArg: any

      (Optional) this context.

    Returns void

staticforEachType

  • forEachType(type: string, callback: any, thisArg?: any): void
  • Provides a forEach variation that invokes the callback if the given type matches that of a stored formatter.


    Parameters

    • type: string

      A format type.

    • callback: any

      A callback function.

    • optionalthisArg: any

      (Optional) this context.

    Returns void

staticformat

  • format(report: default | default | default, name: string, options?: any): any
  • Formats a given ModuleReport or ProjectReport via the formatter of the requested type.


    Parameters

    • report: default | default | default

      A report to format.

    • name: string

      The name of formatter to invoke.

    • optionaloptions: any

      (Optional) One or more optional parameters to pass to the formatter.

    Returns any

staticgetFormats

  • getFormats(reportType?: ReportType): string[]
  • Returns the supported format file extension types.


    Parameters

    • optionalreportType: ReportType

      (Optional) A ReportType to filter supported formats.

    Returns string[]

staticisFormat

  • isFormat(name: string): boolean
  • Returns whether a given formatter by name is available.


    Parameters

    • name: string

      The name of the formatter: format.name.

    Returns boolean

staticisSupported

  • isSupported(name: string, reportType: ReportType): boolean
  • Returns whether a given formatter by name is supports a given report.


    Parameters

    • name: string

      The name of the formatter: format.name.

    • reportType: ReportType

      A ReportType to check for support.

    Returns boolean

staticremoveFormat

  • removeFormat(name: string): void
  • Removes a formatter from the static Map by name.


    Parameters

    • name: string

      The name of the formatter: format.name.

    Returns void