mirror of
https://github.com/jzillmann/pdf-to-markdown.git
synced 2025-08-14 15:58:23 +02:00
Move core module to root
This commit is contained in:
17
src/TOC.ts
Normal file
17
src/TOC.ts
Normal file
@ -0,0 +1,17 @@
|
||||
import Item from './Item';
|
||||
import ItemType from './ItemType';
|
||||
|
||||
/**
|
||||
* Table of contents usually parsed by `DetectToc.ts`.
|
||||
*/
|
||||
export default class TOC {
|
||||
constructor(public tocHeadlineItems: Item[], public pages: number[], public detectedHeadlineLevels: Set<ItemType>) {}
|
||||
|
||||
startPage(): number {
|
||||
return Math.min(...this.pages);
|
||||
}
|
||||
|
||||
endPage(): number {
|
||||
return Math.max(...this.pages);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user