Library for compressing Salesforce metadata.
compressXml(xml, compressionTagsOrOptions);
Example 1: compress all xml
compressXml(xml);
Option defaults for example 1
compressXml(xml, {
indentation: 'space',
tabSize: 4,
endOfLine: 'lf',
maintainDepth: false,
compressionDepth: 1,
});
Example 2: compress tag1 and tag2 xml
compressXml(xml, [ 'tag1', 'tag2' ]);
Option defaults for example 2
compressXml(xml, {
indentation: 'space',
tabSize: 4,
endOfLine: 'lf',
maintainDepth: true,
compressionTags: [ 'tag1', 'tag2' ]
});