Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / operations/logs / splitLines

Function: splitLines()

splitLines(content, decoder, isComplete): string[]

Defined in: packages/b2c-tooling-sdk/src/operations/logs/tail.ts:108

Splits content into lines, handling incomplete lines at boundaries. Uses TextDecoder with stream mode for proper UTF-8 multi-byte character handling.

Parameters

content

ArrayBuffer

ArrayBuffer content

decoder

TextDecoder

TextDecoder instance (should be reused for streaming)

isComplete

boolean = true

Whether this is the final chunk (flush decoder)

Returns

string[]

Array of complete lines (without trailing incomplete line)

Released under the Apache-2.0 License.