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

Function replaceDeferred

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

Source from the content-addressed store, hash-verified

169 });
170 }).then(function() {
171 function replaceDeferred(nodes) {
172 return flatMap(nodes, function(node) {
173 if (node.type === "deferred") {
174 return deferredValues[node.id];
175 } else if (node.children) {
176 return [
177 _.extend({}, node, {
178 children: replaceDeferred(node.children)
179 })
180 ];
181 } else {
182 return [node];
183 }
184 });
185 }
186 var writer = writers.writer({
187 prettyPrint: options.prettyPrint,
188 outputFormat: options.outputFormat

Callers 1

convertToHtmlFunction · 0.70

Calls 2

extendMethod · 0.80
flatMapFunction · 0.70

Tested by

no test coverage detected