@likecoin/epub-ts
    Preparing search index...

    Class Navigation

    Navigation Parser

    navigation html / xhtml / ncx

    Index

    Constructors

    Properties

    landmarks: LandmarkItem[]
    landmarksByType: Record<string, number>
    length: number
    toc: NavItem[]
    tocByHref: Record<string, number>
    tocById: Record<string, number>

    Methods

    • forEach pass through

      Parameters

      • fn: (item: NavItem, index: number, array: NavItem[]) => void

        function to run on each item

      Returns void

      forEach loop

    • Get an item from navigation subitems recursively by index

      Parameters

      • target: string
      • index: number | undefined
      • navItems: NavItem[]

      Returns NavItem | undefined

      navItem

    • Parse out the navigation items

      Parameters

      • xml: Document | NavItem[]

        navigation html / xhtml / ncx

      Returns void

    • Parses lists in the toc

      Parameters

      • navListHtml: Element
      • Optionalparent: string

        id

      Returns NavItem[]

      navigation list