MCPcopy
hub / github.com/exceljs/exceljs / render

Method render

lib/xlsx/xform/list-xform.js:27–43  ·  view source on GitHub ↗
(xmlStream, model)

Source from the content-addressed store, hash-verified

25 }
26
27 render(xmlStream, model) {
28 if (this.always || (model && model.length)) {
29 xmlStream.openNode(this.tag, this.$);
30 if (this.count) {
31 xmlStream.addAttribute(this.$count, (model && model.length) || 0);
32 }
33
34 const {childXform} = this;
35 (model || []).forEach((childModel, index) => {
36 childXform.render(xmlStream, childModel, index);
37 });
38
39 xmlStream.closeNode();
40 } else if (this.empty) {
41 xmlStream.leafNode(this.tag);
42 }
43 }
44
45 parseOpen(node) {
46 if (this.parser) {

Callers

nothing calls this directly

Calls 5

openNodeMethod · 0.80
addAttributeMethod · 0.80
closeNodeMethod · 0.80
leafNodeMethod · 0.80
forEachMethod · 0.65

Tested by

no test coverage detected