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?
Returns
Promise<ExtractedText>
