MCPcopy Create free account
hub / github.com/NaturalIntelligence/fast-xml-parser / addEndIndex

Method addEndIndex

src/xmlparser/xmlNode.js:41–49  ·  view source on GitHub ↗
(endIndex)

Source from the content-addressed store, hash-verified

39 }
40
41 addEndIndex(endIndex) {
42 const lastChild = this.child[this.child.length - 1];
43 // endIndex is write-once: when updateTag drops a node, the last child is a
44 // previously completed sibling whose endIndex must not be overwritten
45 if (lastChild !== undefined && lastChild[METADATA_SYMBOL] !== undefined
46 && lastChild[METADATA_SYMBOL].endIndex === undefined) {
47 lastChild[METADATA_SYMBOL].endIndex = endIndex;
48 }
49 }
50 /** symbol used for metadata */
51 static getMetaDataSymbol() {
52 return METADATA_SYMBOL;

Callers 1

parseXmlFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected