Skip to content

extractText ​

Import from: @xbbg/xnews

extractText(source, options?): Promise<ExtractedText>

Defined in: src/extract.ts (declaration: extract.d.ts:52)

Extracts readable text. Throws a config-coded XnewsFetchError naming the format when no decoder applies, rather than returning empty text that a caller cannot distinguish from a genuinely empty book.

Parameters ​

source ​

bytes ​

Uint8Array

fileName? ​

string

options? ​

ExtractOptions

Returns ​

Promise<ExtractedText>

Last updated:

xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P.