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

Function elementsOfType

static/word2md/mammoth.browser.js:3200–3208  ·  view source on GitHub ↗
(elementType, transform)

Source from the content-addressed store, hash-verified

3198}
3199
3200function elementsOfType(elementType, transform) {
3201 return elements(function(element) {
3202 if (element.type === elementType) {
3203 return transform(element);
3204 } else {
3205 return element;
3206 }
3207 });
3208}
3209
3210function elements(transform) {
3211 return function transformElement(element) {

Callers 2

paragraphFunction · 0.70
runFunction · 0.70

Calls 1

elementsFunction · 0.70

Tested by

no test coverage detected