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

Function readRelationships

static/word2md/mammoth.browser.js:1917–1930  ·  view source on GitHub ↗
(element)

Source from the content-addressed store, hash-verified

1915
1916
1917function readRelationships(element) {
1918 var relationships = [];
1919 element.children.forEach(function(child) {
1920 if (child.name === "{http://schemas.openxmlformats.org/package/2006/relationships}Relationship") {
1921 var relationship = {
1922 relationshipId: child.attributes.Id,
1923 target: child.attributes.Target,
1924 type: child.attributes.Type
1925 };
1926 relationships.push(relationship);
1927 }
1928 });
1929 return new Relationships(relationships);
1930}
1931
1932function Relationships(relationships) {
1933 var targetsByRelationshipId = {};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected