UNPKG

@ng-doc/builder

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

27 lines 940 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getPageAnchorKeywords = getPageAnchorKeywords; const builder_1 = require("@ng-doc/builder"); const helpers_1 = require("../../../../helpers"); /** * * @param entry * @param anchors */ function getPageAnchorKeywords(entry, anchors) { const key = `*${entry.entry.keyword}`; const title = entry.keywordTitle; return anchors.map((anchor) => { if (anchor.scope) { return (0, builder_1.getScopedKeyword)(entry, anchor); } const pageKeyword = (0, helpers_1.constructPageKeyword)(key, title, entry.absoluteRoute(), anchor); const anchorKeyword = { title: pageKeyword.title, path: pageKeyword.path, type: 'link', }; return [(0, helpers_1.formatKeywordKey)(pageKeyword.key), anchorKeyword]; }); } //# sourceMappingURL=get-page-anchor-keywords.js.map