UNPKG

@lillallol/outline-pdf-data-structure

Version:

Create a pdf outline data structure from a high level string representation of pdf outline. This data structure can be used to create a real pdf outline.

13 lines (12 loc) 374 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hasChild = void 0; /** * @description Returns a predicate on whether the provided outline node has a child. */ function hasChild(outline, i) { if (i === outline.length - 1) return false; return outline[i].depth + 1 === outline[i + 1].depth; } exports.hasChild = hasChild;