Skip to content

Latest commit

 

History

History
68 lines (49 loc) · 1.53 KB

toc.md

File metadata and controls

68 lines (49 loc) · 1.53 KB

Toc ⇐ Array

Table Of Contents Parser

Kind: global class
Extends: Array
Link: https://www.w3.org/TR/epub/#sec-nav-toc

new Toc()

Constructor

toc.get(target) ⇒ object

Get navigation item by href

Kind: instance method of Toc
Returns: object - navItem

Param Type
target string

Example

toc.get("chapter_001.xhtml")

toc.parse(target) ⇒ Promise.<Toc>

Parse out the toc items

Kind: instance method of Toc

Param Type
target Node | Array.<object>

toc.clear()

Clear navigation items

Kind: instance method of Toc

toc.destroy()

destroy

Kind: instance method of Toc

Toc.links : Map

Kind: static property of Toc
Read only: true