MCPcopy Create free account
hub / github.com/TruthHun/BookStack / collapse

Function collapse

static/word2md/mammoth.browser.js:2232–2239  ·  view source on GitHub ↗
(nodes)

Source from the content-addressed store, hash-verified

2230}
2231
2232function collapse(nodes) {
2233 var children = [];
2234
2235 nodes.map(collapseNode).forEach(function(child) {
2236 appendChild(children, child);
2237 });
2238 return children;
2239}
2240
2241function collapseNode(node) {
2242 return collapsers[node.type](node);

Callers 2

simplifyFunction · 0.70
collapseElementFunction · 0.70

Calls 1

appendChildFunction · 0.70

Tested by

no test coverage detected