langchain.js
    Preparing search index...

    A class that extends the BaseDocumentLoader class. It represents a document loader that loads documents from EPUB files.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • filePath: string
      • __namedParameters: { splitChapters?: boolean } = {}

      Returns EPubLoader

    Properties

    filePath: string

    Methods

    • A method that loads the EPUB file and returns a promise that resolves to an array of Document instances.

      Returns Promise<Document[]>

      A promise that resolves to an array of Document instances.

    • A protected method that takes an EPUB object as a parameter and returns a promise that resolves to an array of objects representing the content and metadata of each chapter.

      Parameters

      • epub: EPub

        The EPUB object to parse.

      Returns Promise<{ metadata?: object; pageContent: string }[]>

      A promise that resolves to an array of objects representing the content and metadata of each chapter.