# Module utils

### Functions

- asyncForEach
- compareTimestamps
- convertToCSV
- fetchLogByChunks
- formatDataForRequest
- isIEorEdgeOrOldFirefox
- isRelativePath
- isUri
- isUrl
- needsRetry
- parseGeneratedCode
- parseSasViyaLog
- parseSourceCode
- parseWeboutResponse
- serialize
- splitChunks

## Functions

### asyncForEach

- asyncForEach(array: any[], callback: any): Promise<void>

- - Defined in src/utils/asyncForEach.ts:1

  #### Parameters

  - ##### array: any[]

  - ##### callback: any

  #### Returns Promise<void>

### Const compareTimestamps

- compareTimestamps(a: SASjsRequest, b: SASjsRequest ): number

- - Defined in src/utils/compareTimestamps.ts:7

  Comparator for SASjs request timestamps.

  #### Parameters

  - ##### a: SASjsRequest

  - ##### b: SASjsRequest

  #### Returns number

### Const convertToCSV

- convertToCSV(data: any): string

- - Defined in src/utils/convertToCsv.ts:5

  Converts the given JSON object to a CSV string.

  #### Parameters

  - ##### data: any

    the JSON object to convert.

  #### Returns string

### Const fetchLogByChunks

- fetchLogByChunks(requestClient: RequestClient, accessToken: string, logUrl: string, logCount: number): Promise<string>

- - Defined in src/utils/fetchLogByChunks.ts:12

  Fetches content of the log file

  #### Parameters

  - ##### requestClient: RequestClient

    client object of Request Client.

  - ##### accessToken: string

    an access token for an authorized user.

  - ##### logUrl: string

    url of the log file.

  - ##### logCount: number

  #### Returns Promise<string>

  an string containing log lines.

### Const formatDataForRequest

- formatDataForRequest(data: any): any

- - Defined in src/utils/formatDataForRequest.ts:4

  #### Parameters

  - ##### data: any

  #### Returns any

### isIEorEdgeOrOldFirefox

- isIEorEdgeOrOldFirefox(): boolean

- - Defined in src/utils/isIeOrEdge.ts:1

  #### Returns boolean

### Const isRelativePath

- isRelativePath(uri: string): boolean

- - Defined in src/utils/isRelativePath.ts:1

  #### Parameters

  - ##### uri: string

  #### Returns boolean

### Const isUri

- isUri(str: string): boolean

- - Defined in src/utils/isUri.ts:5

  Checks if string is in URI format.

  #### Parameters

  - ##### str: string

    string to check.

  #### Returns boolean

### Const isUrl

- isUrl(url: string): boolean

- - Defined in src/utils/isUrl.ts:5

  Checks if string is in URL format.

  #### Parameters

  - ##### url: string

    string to check.

  #### Returns boolean

### Const needsRetry

- needsRetry(responseText: string): boolean

- - Defined in src/utils/needsRetry.ts:1

  #### Parameters

  - ##### responseText: string

  #### Returns boolean

### Const parseGeneratedCode

- parseGeneratedCode(log: string): string

- - Defined in src/utils/parseGeneratedCode.ts:1

  #### Parameters

  - ##### log: string

  #### Returns string

### Const parseSasViyaLog

- parseSasViyaLog(logResponse: object): string | object

- - Defined in src/utils/parseSasViyaLog.ts:1

  #### Parameters

  - ##### logResponse: object

    - ##### items: any[]

  #### Returns string | object

### Const parseSourceCode

- parseSourceCode(log: string): string

- - Defined in src/utils/parseSourceCode.ts:1

  #### Parameters

  - ##### log: string

  #### Returns string

### Const parseWeboutResponse

- parseWeboutResponse(response: string): string

- - Defined in src/utils/parseWeboutResponse.ts:1

  #### Parameters

  - ##### response: string

  #### Returns string

### Const serialize

- serialize(obj: any): string

- - Defined in src/utils/serialize.ts:1

  #### Parameters

  - ##### obj: any

  #### Returns string

### Const splitChunks

- splitChunks(content: string): any[]

- - Defined in src/utils/splitChunks.ts:1

  #### Parameters

  - ##### content: string

  #### Returns any[]

Generated using TypeDoc