MCPcopy
hub / github.com/GitbookIO/gitbook / parseStructureFile

Function parseStructureFile

lib/parse/parseStructureFile.js:56–65  ·  view source on GitHub ↗

Parse a structure file (ex: SUMMARY.md, GLOSSARY.md). It uses the configuration to find the specified file. @param {Book} book @param {String} type: one of ["glossary", "readme", "summary"] @return {Promise }

(book, type)

Source from the content-addressed store, hash-verified

54 @return {Promise<List|Map>}
55*/
56function parseStructureFile(book, type) {
57 var fs = book.getContentFS();
58
59 return lookupStructureFile(book, type)
60 .then(function(file) {
61 if (!file) return [undefined, undefined];
62
63 return parseFile(fs, file, type);
64 });
65}
66
67module.exports = parseStructureFile;

Callers 4

parseSummaryFunction · 0.85
parseGlossaryFunction · 0.85
parseLanguagesFunction · 0.85
parseReadmeFunction · 0.85

Calls 2

lookupStructureFileFunction · 0.85
parseFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…