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

Method addStartIndex

src/xmlparser/xmlNode.js:33–39  ·  view source on GitHub ↗
(startIndex)

Source from the content-addressed store, hash-verified

31 }
32
33 addStartIndex(startIndex) {
34 if (startIndex !== undefined) {
35 // Note: for now we just overwrite the metadata. If we had more complex metadata,
36 // we might need to do an object append here: metadata = { ...metadata, startIndex }
37 this.child[this.child.length - 1][METADATA_SYMBOL] = { startIndex };
38 }
39 }
40
41 addEndIndex(endIndex) {
42 const lastChild = this.child[this.child.length - 1];

Callers 1

addChildMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected