Skip to main content

OutputParsersModule

@codebolt/types


Interface: OutputParsersModule

Defined in: common/types/src/codeboltjstypes/libFunctionTypes/outputparsers.ts:54

Methods​

parseCSV()​

parseCSV(csvString: string): CSVParseResult;

Defined in: common/types/src/codeboltjstypes/libFunctionTypes/outputparsers.ts:74

Parses CSV string and returns a result object.

Parameters​

ParameterTypeDescription
csvStringstringThe CSV string to parse.

Returns​

CSVParseResult

An object with success flag and parsed data or error.


parseErrors()​

parseErrors(output: ParsableOutput): string[];

Defined in: common/types/src/codeboltjstypes/libFunctionTypes/outputparsers.ts:88

Parses the given output and returns all the error messages.

Parameters​

ParameterTypeDescription
outputParsableOutputThe output to parse for error messages.

Returns​

string[]

An array of error messages.


parseJSON()​

parseJSON(jsonString: string): JSONParseResult;

Defined in: common/types/src/codeboltjstypes/libFunctionTypes/outputparsers.ts:60

Parses JSON string and returns a result object.

Parameters​

ParameterTypeDescription
jsonStringstringThe JSON string to parse.

Returns​

JSONParseResult

An object with success flag and parsed data or error.


parseText()​

parseText(text: string): TextParseResult;

Defined in: common/types/src/codeboltjstypes/libFunctionTypes/outputparsers.ts:81

Parses text string and returns a result object with lines.

Parameters​

ParameterTypeDescription
textstringThe text to parse.

Returns​

TextParseResult

An object with success flag and parsed lines.


parseWarnings()​

parseWarnings(output: ParsableOutput): string[];

Defined in: common/types/src/codeboltjstypes/libFunctionTypes/outputparsers.ts:95

Parses the given output and returns all the warning messages.

Parameters​

ParameterTypeDescription
outputParsableOutputThe output to parse for warning messages.

Returns​

string[]

An array of warning messages.


parseXML()​

parseXML(xmlString: string): XMLParseResult;

Defined in: common/types/src/codeboltjstypes/libFunctionTypes/outputparsers.ts:67

Parses XML string and returns a result object.

Parameters​

ParameterTypeDescription
xmlStringstringThe XML string to parse.

Returns​

XMLParseResult

An object with success flag and parsed data.