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

    Class Spine

    A collection of Spine Items

    Index

    Constructors

    Properties

    baseUrl: string
    epubcfi: EpubCFI
    hooks: { content: Hook; serialize: Hook }
    items: SpineItem[]
    length: number
    loaded: boolean
    spineByHref: Record<string, number>
    spineById: Record<string, number>
    spineItems: Section[]
    spineNodeIndex: number

    Methods

    • Loop over the Sections in the Spine

      Parameters

      Returns void

      forEach

    • Get an item from the spine

      Parameters

      • Optionaltarget: string | number

      Returns Section | null

      section

      spine.get();
      
      spine.get(1);
      
      spine.get("chap1.html");
      
      spine.get("#id1234");
      
    • Unpack items from a opf into spine items

      Parameters

      • _package: Packaging & { basePath?: string; baseUrl?: string }
      • resolver: (href: string, absolute?: boolean) => string

        URL resolver

      • canonical: (href: string) => string

        Resolve canonical url

      Returns void