Home Manual Reference Source Test Repository
public class | source

TransformFormat

Static Method Summary

Static Public Methods
public static

addFormat(format: object)

Adds a formatter to the static Map by type: format.type.

public static

forEach(callback: function, thisArg: object)

Invokes the callback for each stored formatter.

public static

forEachExt(extension: string, callback: function, thisArg: object)

Provides a forEach variation that invokes the callback if the given extension matches that of a stored formatter.

public static

forEachType(type: string, callback: function, thisArg: object)

Provides a forEach variation that invokes the callback if the given type matches that of a stored formatter.

public static

Formats a given ModuleReport or ProjectReport via the formatter of the requested type.

public static

getFormats(reportType: ReportType): string[]

Returns the supported format file extension types.

public static

Returns whether a given formatter by name is available.

public static

isSupported(name: string, reportType: ReportType): boolean

Returns whether a given formatter by name is supports a given report.

public static

Removes a formatter from the static Map by name.

Static Public Methods

public static addFormat(format: object) source

Adds a formatter to the static Map by type: format.type.

Params:

NameTypeAttributeDescription
format object

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

public static forEach(callback: function, thisArg: object) source

Invokes the callback for each stored formatter.

Params:

NameTypeAttributeDescription
callback function

A callback function.

thisArg object

(Optional) this context.

public static forEachExt(extension: string, callback: function, thisArg: object) source

Provides a forEach variation that invokes the callback if the given extension matches that of a stored formatter.

Params:

NameTypeAttributeDescription
extension string

A format extension.

callback function

A callback function.

thisArg object

(Optional) this context.

public static forEachType(type: string, callback: function, thisArg: object) source

Provides a forEach variation that invokes the callback if the given type matches that of a stored formatter.

Params:

NameTypeAttributeDescription
type string

A format type.

callback function

A callback function.

thisArg object

(Optional) this context.

public static format(report: ClassReport | MethodReport | ModuleReport | ProjectReport, name: string, options: object): string source

Formats a given ModuleReport or ProjectReport via the formatter of the requested type.

Params:

NameTypeAttributeDescription
report ClassReport | MethodReport | ModuleReport | ProjectReport

A report to format.

name string

The name of formatter to invoke.

options object

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

Return:

string

public static getFormats(reportType: ReportType): string[] source

Returns the supported format file extension types.

Params:

NameTypeAttributeDescription
reportType ReportType

(Optional) A ReportType to filter supported formats.

Return:

string[]

public static isFormat(name: string): boolean source

Returns whether a given formatter by name is available.

Params:

NameTypeAttributeDescription
name string

The name of the formatter: format.name.

Return:

boolean

public static isSupported(name: string, reportType: ReportType): boolean source

Returns whether a given formatter by name is supports a given report.

Params:

NameTypeAttributeDescription
name string

The name of the formatter: format.name.

reportType ReportType

A ReportType to check for support.

Return:

boolean

public static removeFormat(name: string) source

Removes a formatter from the static Map by name.

Params:

NameTypeAttributeDescription
name string

The name of the formatter: format.name.