Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xml-beautify

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-beautify - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

2

coverage/coverage-final.json

@@ -1,2 +0,2 @@

{"C:\\temp5\\xml-beautify\\src\\XmlBeautify.js": {"path":"C:\\temp5\\xml-beautify\\src\\XmlBeautify.js","statementMap":{"0":{"start":{"line":26,"column":21},"end":{"line":26,"column":22}},"1":{"start":{"line":27,"column":23},"end":{"line":27,"column":24}},"2":{"start":{"line":28,"column":18},"end":{"line":28,"column":19}},"3":{"start":{"line":29,"column":27},"end":{"line":29,"column":28}},"4":{"start":{"line":30,"column":36},"end":{"line":30,"column":37}},"5":{"start":{"line":31,"column":21},"end":{"line":31,"column":22}},"6":{"start":{"line":32,"column":22},"end":{"line":32,"column":23}},"7":{"start":{"line":33,"column":27},"end":{"line":33,"column":29}},"8":{"start":{"line":34,"column":31},"end":{"line":34,"column":33}},"9":{"start":{"line":37,"column":16},"end":{"line":37,"column":28}},"10":{"start":{"line":38,"column":4},"end":{"line":38,"column":36}},"11":{"start":{"line":39,"column":4},"end":{"line":44,"column":5}},"12":{"start":{"line":40,"column":6},"end":{"line":40,"column":37}},"13":{"start":{"line":41,"column":6},"end":{"line":41,"column":37}},"14":{"start":{"line":43,"column":6},"end":{"line":43,"column":36}},"15":{"start":{"line":48,"column":4},"end":{"line":48,"column":41}},"16":{"start":{"line":52,"column":15},"end":{"line":52,"column":19}},"17":{"start":{"line":53,"column":4},"end":{"line":55,"column":5}},"18":{"start":{"line":54,"column":6},"end":{"line":54,"column":18}},"19":{"start":{"line":57,"column":29},"end":{"line":57,"column":94}},"20":{"start":{"line":58,"column":27},"end":{"line":58,"column":49}},"21":{"start":{"line":59,"column":21},"end":{"line":59,"column":88}},"22":{"start":{"line":60,"column":4},"end":{"line":60,"column":20}},"23":{"start":{"line":65,"column":17},"end":{"line":65,"column":19}},"24":{"start":{"line":67,"column":14},"end":{"line":67,"column":39}},"25":{"start":{"line":68,"column":4},"end":{"line":72,"column":5}},"26":{"start":{"line":68,"column":17},"end":{"line":68,"column":18}},"27":{"start":{"line":69,"column":6},"end":{"line":71,"column":7}},"28":{"start":{"line":70,"column":8},"end":{"line":70,"column":41}},"29":{"start":{"line":73,"column":4},"end":{"line":73,"column":16}},"30":{"start":{"line":79,"column":15},"end":{"line":79,"column":19}},"31":{"start":{"line":81,"column":16},"end":{"line":81,"column":62}},"32":{"start":{"line":83,"column":17},"end":{"line":83,"column":21}},"33":{"start":{"line":84,"column":21},"end":{"line":84,"column":28}},"34":{"start":{"line":85,"column":32},"end":{"line":85,"column":37}},"35":{"start":{"line":87,"column":4},"end":{"line":95,"column":5}},"36":{"start":{"line":88,"column":6},"end":{"line":90,"column":7}},"37":{"start":{"line":89,"column":8},"end":{"line":89,"column":29}},"38":{"start":{"line":92,"column":6},"end":{"line":94,"column":7}},"39":{"start":{"line":93,"column":8},"end":{"line":93,"column":59}},"40":{"start":{"line":97,"column":20},"end":{"line":97,"column":24}},"41":{"start":{"line":99,"column":4},"end":{"line":102,"column":5}},"42":{"start":{"line":100,"column":23},"end":{"line":100,"column":46}},"43":{"start":{"line":101,"column":6},"end":{"line":101,"column":70}},"44":{"start":{"line":103,"column":22},"end":{"line":108,"column":5}},"45":{"start":{"line":110,"column":4},"end":{"line":114,"column":5}},"46":{"start":{"line":111,"column":6},"end":{"line":111,"column":61}},"47":{"start":{"line":113,"column":6},"end":{"line":113,"column":54}},"48":{"start":{"line":116,"column":20},"end":{"line":116,"column":22}},"49":{"start":{"line":118,"column":4},"end":{"line":120,"column":5}},"50":{"start":{"line":119,"column":6},"end":{"line":119,"column":36}},"51":{"start":{"line":121,"column":4},"end":{"line":121,"column":35}},"52":{"start":{"line":123,"column":4},"end":{"line":123,"column":21}},"53":{"start":{"line":129,"column":15},"end":{"line":129,"column":19}},"54":{"start":{"line":131,"column":29},"end":{"line":131,"column":48}},"55":{"start":{"line":133,"column":40},"end":{"line":133,"column":136}},"56":{"start":{"line":135,"column":4},"end":{"line":137,"column":5}},"57":{"start":{"line":136,"column":6},"end":{"line":136,"column":30}},"58":{"start":{"line":141,"column":4},"end":{"line":145,"column":5}},"59":{"start":{"line":142,"column":6},"end":{"line":142,"column":65}},"60":{"start":{"line":144,"column":6},"end":{"line":144,"column":60}},"61":{"start":{"line":147,"column":39},"end":{"line":147,"column":90}},"62":{"start":{"line":148,"column":31},"end":{"line":148,"column":80}},"63":{"start":{"line":149,"column":27},"end":{"line":149,"column":77}},"64":{"start":{"line":151,"column":34},"end":{"line":151,"column":65}},"65":{"start":{"line":153,"column":27},"end":{"line":153,"column":30}},"66":{"start":{"line":154,"column":27},"end":{"line":154,"column":30}},"67":{"start":{"line":155,"column":32},"end":{"line":155,"column":37}},"68":{"start":{"line":156,"column":25},"end":{"line":156,"column":29}},"69":{"start":{"line":157,"column":25},"end":{"line":157,"column":28}},"70":{"start":{"line":159,"column":25},"end":{"line":159,"column":27}},"71":{"start":{"line":161,"column":4},"end":{"line":163,"column":5}},"72":{"start":{"line":162,"column":6},"end":{"line":162,"column":42}},"73":{"start":{"line":165,"column":21},"end":{"line":165,"column":23}},"74":{"start":{"line":168,"column":4},"end":{"line":170,"column":5}},"75":{"start":{"line":168,"column":19},"end":{"line":168,"column":20}},"76":{"start":{"line":169,"column":6},"end":{"line":169,"column":41}},"77":{"start":{"line":171,"column":4},"end":{"line":171,"column":36}},"78":{"start":{"line":172,"column":4},"end":{"line":172,"column":57}},"79":{"start":{"line":175,"column":4},"end":{"line":178,"column":5}},"80":{"start":{"line":175,"column":17},"end":{"line":175,"column":18}},"81":{"start":{"line":176,"column":19},"end":{"line":176,"column":40}},"82":{"start":{"line":177,"column":6},"end":{"line":177,"column":80}},"83":{"start":{"line":180,"column":4},"end":{"line":185,"column":5}},"84":{"start":{"line":181,"column":6},"end":{"line":181,"column":47}},"85":{"start":{"line":184,"column":6},"end":{"line":184,"column":42}},"86":{"start":{"line":187,"column":4},"end":{"line":196,"column":5}},"87":{"start":{"line":188,"column":6},"end":{"line":188,"column":42}},"88":{"start":{"line":191,"column":6},"end":{"line":194,"column":7}},"89":{"start":{"line":193,"column":8},"end":{"line":193,"column":34}},"90":{"start":{"line":198,"column":4},"end":{"line":198,"column":28}},"91":{"start":{"line":202,"column":4},"end":{"line":206,"column":5}},"92":{"start":{"line":203,"column":6},"end":{"line":203,"column":52}},"93":{"start":{"line":205,"column":6},"end":{"line":205,"column":47}},"94":{"start":{"line":208,"column":4},"end":{"line":216,"column":5}},"95":{"start":{"line":208,"column":17},"end":{"line":208,"column":18}},"96":{"start":{"line":210,"column":6},"end":{"line":214,"column":7}},"97":{"start":{"line":211,"column":8},"end":{"line":211,"column":41}},"98":{"start":{"line":213,"column":8},"end":{"line":213,"column":36}},"99":{"start":{"line":215,"column":6},"end":{"line":215,"column":44}},"100":{"start":{"line":217,"column":4},"end":{"line":217,"column":28}},"101":{"start":{"line":219,"column":4},"end":{"line":235,"column":5}},"102":{"start":{"line":220,"column":6},"end":{"line":226,"column":7}},"103":{"start":{"line":223,"column":23},"end":{"line":223,"column":68}},"104":{"start":{"line":224,"column":8},"end":{"line":224,"column":36}},"105":{"start":{"line":225,"column":8},"end":{"line":225,"column":34}},"106":{"start":{"line":228,"column":21},"end":{"line":228,"column":66}},"107":{"start":{"line":230,"column":6},"end":{"line":232,"column":7}},"108":{"start":{"line":231,"column":8},"end":{"line":231,"column":40}},"109":{"start":{"line":233,"column":6},"end":{"line":233,"column":34}},"110":{"start":{"line":234,"column":6},"end":{"line":234,"column":32}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":36,"column":2},"end":{"line":36,"column":3}},"loc":{"start":{"line":36,"column":22},"end":{"line":45,"column":3}},"line":36},"1":{"name":"(anonymous_1)","decl":{"start":{"line":47,"column":2},"end":{"line":47,"column":3}},"loc":{"start":{"line":47,"column":21},"end":{"line":49,"column":3}},"line":47},"2":{"name":"(anonymous_2)","decl":{"start":{"line":51,"column":2},"end":{"line":51,"column":3}},"loc":{"start":{"line":51,"column":23},"end":{"line":61,"column":3}},"line":51},"3":{"name":"(anonymous_3)","decl":{"start":{"line":64,"column":2},"end":{"line":64,"column":3}},"loc":{"start":{"line":64,"column":21},"end":{"line":76,"column":3}},"line":64},"4":{"name":"(anonymous_4)","decl":{"start":{"line":78,"column":2},"end":{"line":78,"column":3}},"loc":{"start":{"line":78,"column":26},"end":{"line":126,"column":3}},"line":78},"5":{"name":"(anonymous_5)","decl":{"start":{"line":128,"column":2},"end":{"line":128,"column":3}},"loc":{"start":{"line":128,"column":39},"end":{"line":236,"column":3}},"line":128}},"branchMap":{"0":{"loc":{"start":{"line":37,"column":16},"end":{"line":37,"column":28}},"type":"binary-expr","locations":[{"start":{"line":37,"column":16},"end":{"line":37,"column":22}},{"start":{"line":37,"column":26},"end":{"line":37,"column":28}}],"line":37},"1":{"loc":{"start":{"line":39,"column":4},"end":{"line":44,"column":5}},"type":"if","locations":[{"start":{"line":39,"column":4},"end":{"line":44,"column":5}},{"start":{"line":39,"column":4},"end":{"line":44,"column":5}}],"line":39},"2":{"loc":{"start":{"line":53,"column":4},"end":{"line":55,"column":5}},"type":"if","locations":[{"start":{"line":53,"column":4},"end":{"line":55,"column":5}},{"start":{"line":53,"column":4},"end":{"line":55,"column":5}}],"line":53},"3":{"loc":{"start":{"line":69,"column":6},"end":{"line":71,"column":7}},"type":"if","locations":[{"start":{"line":69,"column":6},"end":{"line":71,"column":7}},{"start":{"line":69,"column":6},"end":{"line":71,"column":7}}],"line":69},"4":{"loc":{"start":{"line":87,"column":4},"end":{"line":95,"column":5}},"type":"if","locations":[{"start":{"line":87,"column":4},"end":{"line":95,"column":5}},{"start":{"line":87,"column":4},"end":{"line":95,"column":5}}],"line":87},"5":{"loc":{"start":{"line":88,"column":6},"end":{"line":90,"column":7}},"type":"if","locations":[{"start":{"line":88,"column":6},"end":{"line":90,"column":7}},{"start":{"line":88,"column":6},"end":{"line":90,"column":7}}],"line":88},"6":{"loc":{"start":{"line":92,"column":6},"end":{"line":94,"column":7}},"type":"if","locations":[{"start":{"line":92,"column":6},"end":{"line":94,"column":7}},{"start":{"line":92,"column":6},"end":{"line":94,"column":7}}],"line":92},"7":{"loc":{"start":{"line":99,"column":4},"end":{"line":102,"column":5}},"type":"if","locations":[{"start":{"line":99,"column":4},"end":{"line":102,"column":5}},{"start":{"line":99,"column":4},"end":{"line":102,"column":5}}],"line":99},"8":{"loc":{"start":{"line":110,"column":4},"end":{"line":114,"column":5}},"type":"if","locations":[{"start":{"line":110,"column":4},"end":{"line":114,"column":5}},{"start":{"line":110,"column":4},"end":{"line":114,"column":5}}],"line":110},"9":{"loc":{"start":{"line":118,"column":4},"end":{"line":120,"column":5}},"type":"if","locations":[{"start":{"line":118,"column":4},"end":{"line":120,"column":5}},{"start":{"line":118,"column":4},"end":{"line":120,"column":5}}],"line":118},"10":{"loc":{"start":{"line":135,"column":4},"end":{"line":137,"column":5}},"type":"if","locations":[{"start":{"line":135,"column":4},"end":{"line":137,"column":5}},{"start":{"line":135,"column":4},"end":{"line":137,"column":5}}],"line":135},"11":{"loc":{"start":{"line":141,"column":4},"end":{"line":145,"column":5}},"type":"if","locations":[{"start":{"line":141,"column":4},"end":{"line":145,"column":5}},{"start":{"line":141,"column":4},"end":{"line":145,"column":5}}],"line":141},"12":{"loc":{"start":{"line":147,"column":39},"end":{"line":147,"column":90}},"type":"binary-expr","locations":[{"start":{"line":147,"column":39},"end":{"line":147,"column":57}},{"start":{"line":147,"column":61},"end":{"line":147,"column":90}}],"line":147},"13":{"loc":{"start":{"line":148,"column":31},"end":{"line":148,"column":80}},"type":"binary-expr","locations":[{"start":{"line":148,"column":31},"end":{"line":148,"column":51}},{"start":{"line":148,"column":55},"end":{"line":148,"column":80}}],"line":148},"14":{"loc":{"start":{"line":149,"column":27},"end":{"line":149,"column":77}},"type":"binary-expr","locations":[{"start":{"line":149,"column":27},"end":{"line":149,"column":47}},{"start":{"line":149,"column":51},"end":{"line":149,"column":77}}],"line":149},"15":{"loc":{"start":{"line":161,"column":4},"end":{"line":163,"column":5}},"type":"if","locations":[{"start":{"line":161,"column":4},"end":{"line":163,"column":5}},{"start":{"line":161,"column":4},"end":{"line":163,"column":5}}],"line":161},"16":{"loc":{"start":{"line":180,"column":4},"end":{"line":185,"column":5}},"type":"if","locations":[{"start":{"line":180,"column":4},"end":{"line":185,"column":5}},{"start":{"line":180,"column":4},"end":{"line":185,"column":5}}],"line":180},"17":{"loc":{"start":{"line":180,"column":8},"end":{"line":180,"column":47}},"type":"binary-expr","locations":[{"start":{"line":180,"column":8},"end":{"line":180,"column":22}},{"start":{"line":180,"column":26},"end":{"line":180,"column":47}}],"line":180},"18":{"loc":{"start":{"line":187,"column":4},"end":{"line":196,"column":5}},"type":"if","locations":[{"start":{"line":187,"column":4},"end":{"line":196,"column":5}},{"start":{"line":187,"column":4},"end":{"line":196,"column":5}}],"line":187},"19":{"loc":{"start":{"line":191,"column":6},"end":{"line":194,"column":7}},"type":"if","locations":[{"start":{"line":191,"column":6},"end":{"line":194,"column":7}},{"start":{"line":191,"column":6},"end":{"line":194,"column":7}}],"line":191},"20":{"loc":{"start":{"line":191,"column":10},"end":{"line":191,"column":50}},"type":"binary-expr","locations":[{"start":{"line":191,"column":10},"end":{"line":191,"column":24}},{"start":{"line":191,"column":28},"end":{"line":191,"column":50}}],"line":191},"21":{"loc":{"start":{"line":202,"column":4},"end":{"line":206,"column":5}},"type":"if","locations":[{"start":{"line":202,"column":4},"end":{"line":206,"column":5}},{"start":{"line":202,"column":4},"end":{"line":206,"column":5}}],"line":202},"22":{"loc":{"start":{"line":210,"column":6},"end":{"line":214,"column":7}},"type":"if","locations":[{"start":{"line":210,"column":6},"end":{"line":214,"column":7}},{"start":{"line":210,"column":6},"end":{"line":214,"column":7}}],"line":210},"23":{"loc":{"start":{"line":219,"column":4},"end":{"line":235,"column":5}},"type":"if","locations":[{"start":{"line":219,"column":4},"end":{"line":235,"column":5}},{"start":{"line":219,"column":4},"end":{"line":235,"column":5}}],"line":219},"24":{"loc":{"start":{"line":220,"column":6},"end":{"line":226,"column":7}},"type":"if","locations":[{"start":{"line":220,"column":6},"end":{"line":226,"column":7}},{"start":{"line":220,"column":6},"end":{"line":226,"column":7}}],"line":220},"25":{"loc":{"start":{"line":230,"column":6},"end":{"line":232,"column":7}},"type":"if","locations":[{"start":{"line":230,"column":6},"end":{"line":232,"column":7}},{"start":{"line":230,"column":6},"end":{"line":232,"column":7}}],"line":230},"26":{"loc":{"start":{"line":230,"column":12},"end":{"line":230,"column":61}},"type":"binary-expr","locations":[{"start":{"line":230,"column":12},"end":{"line":230,"column":32}},{"start":{"line":230,"column":36},"end":{"line":230,"column":61}}],"line":230}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":14,"10":14,"11":14,"12":7,"13":7,"14":7,"15":28,"16":14,"17":14,"18":0,"19":14,"20":14,"21":14,"22":14,"23":69,"24":69,"25":69,"26":69,"27":135,"28":67,"29":69,"30":14,"31":14,"32":14,"33":14,"34":14,"35":14,"36":12,"37":8,"38":12,"39":2,"40":14,"41":14,"42":14,"43":14,"44":14,"45":14,"46":7,"47":7,"48":14,"49":14,"50":14,"51":14,"52":14,"53":46,"54":46,"55":46,"56":46,"57":34,"58":46,"59":23,"60":23,"61":46,"62":46,"63":46,"64":46,"65":46,"66":46,"67":46,"68":46,"69":46,"70":46,"71":46,"72":4,"73":46,"74":46,"75":46,"76":58,"77":46,"78":46,"79":46,"80":46,"81":16,"82":16,"83":46,"84":2,"85":44,"86":46,"87":4,"88":42,"89":24,"90":46,"91":46,"92":23,"93":23,"94":46,"95":46,"96":32,"97":16,"98":16,"99":32,"100":46,"101":46,"102":20,"103":18,"104":18,"105":18,"106":26,"107":26,"108":22,"109":26,"110":26},"f":{"0":14,"1":28,"2":14,"3":69,"4":14,"5":46},"b":{"0":[14,7],"1":[7,7],"2":[0,14],"3":[67,68],"4":[12,2],"5":[8,4],"6":[2,10],"7":[14,0],"8":[7,7],"9":[14,0],"10":[34,12],"11":[23,23],"12":[46,12],"13":[46,24],"14":[46,24],"15":[4,42],"16":[2,44],"17":[46,20],"18":[4,42],"19":[18,24],"20":[42,20],"21":[23,23],"22":[16,16],"23":[20,26],"24":[2,18],"25":[22,4],"26":[26,4]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"d7a5b12b69aa462980a22087de41b6ef015c50f2"}
{"C:\\temp5\\xml-beautify\\src\\XmlBeautify.js": {"path":"C:\\temp5\\xml-beautify\\src\\XmlBeautify.js","statementMap":{"0":{"start":{"line":26,"column":21},"end":{"line":26,"column":22}},"1":{"start":{"line":27,"column":23},"end":{"line":27,"column":24}},"2":{"start":{"line":28,"column":18},"end":{"line":28,"column":19}},"3":{"start":{"line":29,"column":27},"end":{"line":29,"column":28}},"4":{"start":{"line":30,"column":36},"end":{"line":30,"column":37}},"5":{"start":{"line":31,"column":21},"end":{"line":31,"column":22}},"6":{"start":{"line":32,"column":22},"end":{"line":32,"column":23}},"7":{"start":{"line":33,"column":27},"end":{"line":33,"column":29}},"8":{"start":{"line":34,"column":31},"end":{"line":34,"column":33}},"9":{"start":{"line":37,"column":16},"end":{"line":37,"column":28}},"10":{"start":{"line":38,"column":4},"end":{"line":38,"column":36}},"11":{"start":{"line":39,"column":4},"end":{"line":44,"column":5}},"12":{"start":{"line":40,"column":6},"end":{"line":40,"column":37}},"13":{"start":{"line":41,"column":6},"end":{"line":41,"column":37}},"14":{"start":{"line":43,"column":6},"end":{"line":43,"column":36}},"15":{"start":{"line":48,"column":4},"end":{"line":48,"column":41}},"16":{"start":{"line":52,"column":15},"end":{"line":52,"column":19}},"17":{"start":{"line":53,"column":4},"end":{"line":55,"column":5}},"18":{"start":{"line":54,"column":6},"end":{"line":54,"column":18}},"19":{"start":{"line":57,"column":29},"end":{"line":57,"column":94}},"20":{"start":{"line":58,"column":27},"end":{"line":58,"column":49}},"21":{"start":{"line":59,"column":21},"end":{"line":59,"column":88}},"22":{"start":{"line":60,"column":4},"end":{"line":60,"column":20}},"23":{"start":{"line":71,"column":17},"end":{"line":71,"column":19}},"24":{"start":{"line":72,"column":28},"end":{"line":72,"column":53}},"25":{"start":{"line":73,"column":4},"end":{"line":77,"column":5}},"26":{"start":{"line":73,"column":17},"end":{"line":73,"column":18}},"27":{"start":{"line":74,"column":6},"end":{"line":76,"column":7}},"28":{"start":{"line":75,"column":8},"end":{"line":75,"column":41}},"29":{"start":{"line":78,"column":4},"end":{"line":78,"column":16}},"30":{"start":{"line":82,"column":15},"end":{"line":82,"column":19}},"31":{"start":{"line":84,"column":16},"end":{"line":84,"column":62}},"32":{"start":{"line":86,"column":17},"end":{"line":86,"column":21}},"33":{"start":{"line":87,"column":21},"end":{"line":87,"column":28}},"34":{"start":{"line":88,"column":32},"end":{"line":88,"column":37}},"35":{"start":{"line":90,"column":4},"end":{"line":98,"column":5}},"36":{"start":{"line":91,"column":6},"end":{"line":93,"column":7}},"37":{"start":{"line":92,"column":8},"end":{"line":92,"column":29}},"38":{"start":{"line":95,"column":6},"end":{"line":97,"column":7}},"39":{"start":{"line":96,"column":8},"end":{"line":96,"column":59}},"40":{"start":{"line":100,"column":20},"end":{"line":100,"column":24}},"41":{"start":{"line":102,"column":4},"end":{"line":105,"column":5}},"42":{"start":{"line":103,"column":23},"end":{"line":103,"column":46}},"43":{"start":{"line":104,"column":6},"end":{"line":104,"column":70}},"44":{"start":{"line":106,"column":22},"end":{"line":111,"column":5}},"45":{"start":{"line":113,"column":4},"end":{"line":117,"column":5}},"46":{"start":{"line":114,"column":6},"end":{"line":114,"column":61}},"47":{"start":{"line":116,"column":6},"end":{"line":116,"column":54}},"48":{"start":{"line":119,"column":20},"end":{"line":119,"column":22}},"49":{"start":{"line":121,"column":4},"end":{"line":123,"column":5}},"50":{"start":{"line":122,"column":6},"end":{"line":122,"column":36}},"51":{"start":{"line":124,"column":4},"end":{"line":124,"column":35}},"52":{"start":{"line":126,"column":4},"end":{"line":126,"column":21}},"53":{"start":{"line":130,"column":15},"end":{"line":130,"column":19}},"54":{"start":{"line":132,"column":29},"end":{"line":132,"column":48}},"55":{"start":{"line":134,"column":40},"end":{"line":134,"column":136}},"56":{"start":{"line":136,"column":4},"end":{"line":138,"column":5}},"57":{"start":{"line":137,"column":6},"end":{"line":137,"column":30}},"58":{"start":{"line":142,"column":4},"end":{"line":146,"column":5}},"59":{"start":{"line":143,"column":6},"end":{"line":143,"column":65}},"60":{"start":{"line":145,"column":6},"end":{"line":145,"column":60}},"61":{"start":{"line":148,"column":39},"end":{"line":148,"column":90}},"62":{"start":{"line":149,"column":31},"end":{"line":149,"column":80}},"63":{"start":{"line":150,"column":27},"end":{"line":150,"column":77}},"64":{"start":{"line":152,"column":34},"end":{"line":152,"column":65}},"65":{"start":{"line":154,"column":27},"end":{"line":154,"column":30}},"66":{"start":{"line":155,"column":27},"end":{"line":155,"column":30}},"67":{"start":{"line":156,"column":32},"end":{"line":156,"column":37}},"68":{"start":{"line":157,"column":25},"end":{"line":157,"column":29}},"69":{"start":{"line":158,"column":25},"end":{"line":158,"column":28}},"70":{"start":{"line":160,"column":25},"end":{"line":160,"column":27}},"71":{"start":{"line":162,"column":4},"end":{"line":171,"column":5}},"72":{"start":{"line":163,"column":38},"end":{"line":163,"column":69}},"73":{"start":{"line":164,"column":6},"end":{"line":170,"column":7}},"74":{"start":{"line":165,"column":8},"end":{"line":165,"column":38}},"75":{"start":{"line":166,"column":8},"end":{"line":166,"column":31}},"76":{"start":{"line":167,"column":8},"end":{"line":167,"column":32}},"77":{"start":{"line":169,"column":8},"end":{"line":169,"column":45}},"78":{"start":{"line":173,"column":21},"end":{"line":173,"column":23}},"79":{"start":{"line":175,"column":4},"end":{"line":177,"column":5}},"80":{"start":{"line":175,"column":19},"end":{"line":175,"column":20}},"81":{"start":{"line":176,"column":6},"end":{"line":176,"column":41}},"82":{"start":{"line":178,"column":4},"end":{"line":178,"column":36}},"83":{"start":{"line":179,"column":4},"end":{"line":179,"column":57}},"84":{"start":{"line":182,"column":4},"end":{"line":185,"column":5}},"85":{"start":{"line":182,"column":17},"end":{"line":182,"column":18}},"86":{"start":{"line":183,"column":19},"end":{"line":183,"column":40}},"87":{"start":{"line":184,"column":6},"end":{"line":184,"column":80}},"88":{"start":{"line":187,"column":4},"end":{"line":192,"column":5}},"89":{"start":{"line":188,"column":6},"end":{"line":188,"column":47}},"90":{"start":{"line":191,"column":6},"end":{"line":191,"column":42}},"91":{"start":{"line":194,"column":4},"end":{"line":203,"column":5}},"92":{"start":{"line":195,"column":6},"end":{"line":195,"column":42}},"93":{"start":{"line":198,"column":6},"end":{"line":201,"column":7}},"94":{"start":{"line":200,"column":8},"end":{"line":200,"column":34}},"95":{"start":{"line":205,"column":4},"end":{"line":205,"column":28}},"96":{"start":{"line":209,"column":4},"end":{"line":213,"column":5}},"97":{"start":{"line":210,"column":6},"end":{"line":210,"column":52}},"98":{"start":{"line":212,"column":6},"end":{"line":212,"column":47}},"99":{"start":{"line":215,"column":4},"end":{"line":223,"column":5}},"100":{"start":{"line":215,"column":17},"end":{"line":215,"column":18}},"101":{"start":{"line":217,"column":6},"end":{"line":221,"column":7}},"102":{"start":{"line":218,"column":8},"end":{"line":218,"column":41}},"103":{"start":{"line":220,"column":8},"end":{"line":220,"column":36}},"104":{"start":{"line":222,"column":6},"end":{"line":222,"column":44}},"105":{"start":{"line":224,"column":4},"end":{"line":224,"column":28}},"106":{"start":{"line":226,"column":4},"end":{"line":242,"column":5}},"107":{"start":{"line":227,"column":6},"end":{"line":233,"column":7}},"108":{"start":{"line":230,"column":23},"end":{"line":230,"column":68}},"109":{"start":{"line":231,"column":8},"end":{"line":231,"column":36}},"110":{"start":{"line":232,"column":8},"end":{"line":232,"column":34}},"111":{"start":{"line":235,"column":21},"end":{"line":235,"column":66}},"112":{"start":{"line":237,"column":6},"end":{"line":239,"column":7}},"113":{"start":{"line":238,"column":8},"end":{"line":238,"column":40}},"114":{"start":{"line":240,"column":6},"end":{"line":240,"column":34}},"115":{"start":{"line":241,"column":6},"end":{"line":241,"column":32}},"116":{"start":{"line":254,"column":28},"end":{"line":254,"column":53}},"117":{"start":{"line":255,"column":4},"end":{"line":260,"column":5}},"118":{"start":{"line":255,"column":17},"end":{"line":255,"column":18}},"119":{"start":{"line":256,"column":6},"end":{"line":259,"column":7}},"120":{"start":{"line":257,"column":8},"end":{"line":257,"column":73}},"121":{"start":{"line":261,"column":4},"end":{"line":261,"column":36}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":36,"column":2},"end":{"line":36,"column":3}},"loc":{"start":{"line":36,"column":22},"end":{"line":45,"column":3}},"line":36},"1":{"name":"(anonymous_1)","decl":{"start":{"line":47,"column":2},"end":{"line":47,"column":3}},"loc":{"start":{"line":47,"column":21},"end":{"line":49,"column":3}},"line":47},"2":{"name":"(anonymous_2)","decl":{"start":{"line":51,"column":2},"end":{"line":51,"column":3}},"loc":{"start":{"line":51,"column":23},"end":{"line":61,"column":3}},"line":51},"3":{"name":"(anonymous_3)","decl":{"start":{"line":70,"column":2},"end":{"line":70,"column":3}},"loc":{"start":{"line":70,"column":21},"end":{"line":79,"column":3}},"line":70},"4":{"name":"(anonymous_4)","decl":{"start":{"line":81,"column":2},"end":{"line":81,"column":3}},"loc":{"start":{"line":81,"column":26},"end":{"line":127,"column":3}},"line":81},"5":{"name":"(anonymous_5)","decl":{"start":{"line":129,"column":2},"end":{"line":129,"column":3}},"loc":{"start":{"line":129,"column":39},"end":{"line":243,"column":3}},"line":129},"6":{"name":"(anonymous_6)","decl":{"start":{"line":253,"column":2},"end":{"line":253,"column":3}},"loc":{"start":{"line":253,"column":31},"end":{"line":262,"column":3}},"line":253}},"branchMap":{"0":{"loc":{"start":{"line":37,"column":16},"end":{"line":37,"column":28}},"type":"binary-expr","locations":[{"start":{"line":37,"column":16},"end":{"line":37,"column":22}},{"start":{"line":37,"column":26},"end":{"line":37,"column":28}}],"line":37},"1":{"loc":{"start":{"line":39,"column":4},"end":{"line":44,"column":5}},"type":"if","locations":[{"start":{"line":39,"column":4},"end":{"line":44,"column":5}},{"start":{"line":42,"column":11},"end":{"line":44,"column":5}}],"line":39},"2":{"loc":{"start":{"line":53,"column":4},"end":{"line":55,"column":5}},"type":"if","locations":[{"start":{"line":53,"column":4},"end":{"line":55,"column":5}},{"start":{},"end":{}}],"line":53},"3":{"loc":{"start":{"line":74,"column":6},"end":{"line":76,"column":7}},"type":"if","locations":[{"start":{"line":74,"column":6},"end":{"line":76,"column":7}},{"start":{},"end":{}}],"line":74},"4":{"loc":{"start":{"line":90,"column":4},"end":{"line":98,"column":5}},"type":"if","locations":[{"start":{"line":90,"column":4},"end":{"line":98,"column":5}},{"start":{},"end":{}}],"line":90},"5":{"loc":{"start":{"line":91,"column":6},"end":{"line":93,"column":7}},"type":"if","locations":[{"start":{"line":91,"column":6},"end":{"line":93,"column":7}},{"start":{},"end":{}}],"line":91},"6":{"loc":{"start":{"line":95,"column":6},"end":{"line":97,"column":7}},"type":"if","locations":[{"start":{"line":95,"column":6},"end":{"line":97,"column":7}},{"start":{},"end":{}}],"line":95},"7":{"loc":{"start":{"line":102,"column":4},"end":{"line":105,"column":5}},"type":"if","locations":[{"start":{"line":102,"column":4},"end":{"line":105,"column":5}},{"start":{},"end":{}}],"line":102},"8":{"loc":{"start":{"line":113,"column":4},"end":{"line":117,"column":5}},"type":"if","locations":[{"start":{"line":113,"column":4},"end":{"line":117,"column":5}},{"start":{"line":115,"column":11},"end":{"line":117,"column":5}}],"line":113},"9":{"loc":{"start":{"line":121,"column":4},"end":{"line":123,"column":5}},"type":"if","locations":[{"start":{"line":121,"column":4},"end":{"line":123,"column":5}},{"start":{},"end":{}}],"line":121},"10":{"loc":{"start":{"line":136,"column":4},"end":{"line":138,"column":5}},"type":"if","locations":[{"start":{"line":136,"column":4},"end":{"line":138,"column":5}},{"start":{},"end":{}}],"line":136},"11":{"loc":{"start":{"line":142,"column":4},"end":{"line":146,"column":5}},"type":"if","locations":[{"start":{"line":142,"column":4},"end":{"line":146,"column":5}},{"start":{"line":144,"column":11},"end":{"line":146,"column":5}}],"line":142},"12":{"loc":{"start":{"line":148,"column":39},"end":{"line":148,"column":90}},"type":"binary-expr","locations":[{"start":{"line":148,"column":39},"end":{"line":148,"column":57}},{"start":{"line":148,"column":61},"end":{"line":148,"column":90}}],"line":148},"13":{"loc":{"start":{"line":149,"column":31},"end":{"line":149,"column":80}},"type":"binary-expr","locations":[{"start":{"line":149,"column":31},"end":{"line":149,"column":51}},{"start":{"line":149,"column":55},"end":{"line":149,"column":80}}],"line":149},"14":{"loc":{"start":{"line":150,"column":27},"end":{"line":150,"column":77}},"type":"binary-expr","locations":[{"start":{"line":150,"column":27},"end":{"line":150,"column":47}},{"start":{"line":150,"column":51},"end":{"line":150,"column":77}}],"line":150},"15":{"loc":{"start":{"line":162,"column":4},"end":{"line":171,"column":5}},"type":"if","locations":[{"start":{"line":162,"column":4},"end":{"line":171,"column":5}},{"start":{},"end":{}}],"line":162},"16":{"loc":{"start":{"line":164,"column":6},"end":{"line":170,"column":7}},"type":"if","locations":[{"start":{"line":164,"column":6},"end":{"line":170,"column":7}},{"start":{"line":168,"column":13},"end":{"line":170,"column":7}}],"line":164},"17":{"loc":{"start":{"line":187,"column":4},"end":{"line":192,"column":5}},"type":"if","locations":[{"start":{"line":187,"column":4},"end":{"line":192,"column":5}},{"start":{"line":190,"column":11},"end":{"line":192,"column":5}}],"line":187},"18":{"loc":{"start":{"line":187,"column":8},"end":{"line":187,"column":47}},"type":"binary-expr","locations":[{"start":{"line":187,"column":8},"end":{"line":187,"column":22}},{"start":{"line":187,"column":26},"end":{"line":187,"column":47}}],"line":187},"19":{"loc":{"start":{"line":194,"column":4},"end":{"line":203,"column":5}},"type":"if","locations":[{"start":{"line":194,"column":4},"end":{"line":203,"column":5}},{"start":{"line":196,"column":11},"end":{"line":203,"column":5}}],"line":194},"20":{"loc":{"start":{"line":198,"column":6},"end":{"line":201,"column":7}},"type":"if","locations":[{"start":{"line":198,"column":6},"end":{"line":201,"column":7}},{"start":{"line":199,"column":13},"end":{"line":201,"column":7}}],"line":198},"21":{"loc":{"start":{"line":198,"column":10},"end":{"line":198,"column":50}},"type":"binary-expr","locations":[{"start":{"line":198,"column":10},"end":{"line":198,"column":24}},{"start":{"line":198,"column":28},"end":{"line":198,"column":50}}],"line":198},"22":{"loc":{"start":{"line":209,"column":4},"end":{"line":213,"column":5}},"type":"if","locations":[{"start":{"line":209,"column":4},"end":{"line":213,"column":5}},{"start":{"line":211,"column":11},"end":{"line":213,"column":5}}],"line":209},"23":{"loc":{"start":{"line":217,"column":6},"end":{"line":221,"column":7}},"type":"if","locations":[{"start":{"line":217,"column":6},"end":{"line":221,"column":7}},{"start":{"line":219,"column":13},"end":{"line":221,"column":7}}],"line":217},"24":{"loc":{"start":{"line":226,"column":4},"end":{"line":242,"column":5}},"type":"if","locations":[{"start":{"line":226,"column":4},"end":{"line":242,"column":5}},{"start":{"line":234,"column":11},"end":{"line":242,"column":5}}],"line":226},"25":{"loc":{"start":{"line":227,"column":6},"end":{"line":233,"column":7}},"type":"if","locations":[{"start":{"line":227,"column":6},"end":{"line":233,"column":7}},{"start":{"line":229,"column":13},"end":{"line":233,"column":7}}],"line":227},"26":{"loc":{"start":{"line":237,"column":6},"end":{"line":239,"column":7}},"type":"if","locations":[{"start":{"line":237,"column":6},"end":{"line":239,"column":7}},{"start":{},"end":{}}],"line":237},"27":{"loc":{"start":{"line":237,"column":12},"end":{"line":237,"column":61}},"type":"binary-expr","locations":[{"start":{"line":237,"column":12},"end":{"line":237,"column":32}},{"start":{"line":237,"column":36},"end":{"line":237,"column":61}}],"line":237},"28":{"loc":{"start":{"line":256,"column":6},"end":{"line":259,"column":7}},"type":"if","locations":[{"start":{"line":256,"column":6},"end":{"line":259,"column":7}},{"start":{},"end":{}}],"line":256}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":16,"10":16,"11":16,"12":9,"13":9,"14":7,"15":32,"16":16,"17":16,"18":0,"19":16,"20":16,"21":16,"22":16,"23":78,"24":78,"25":78,"26":78,"27":159,"28":72,"29":78,"30":16,"31":16,"32":16,"33":16,"34":16,"35":16,"36":14,"37":8,"38":14,"39":2,"40":16,"41":16,"42":16,"43":16,"44":16,"45":16,"46":9,"47":7,"48":16,"49":16,"50":16,"51":16,"52":16,"53":49,"54":49,"55":49,"56":49,"57":34,"58":49,"59":26,"60":23,"61":49,"62":49,"63":49,"64":49,"65":49,"66":49,"67":49,"68":49,"69":49,"70":49,"71":49,"72":6,"73":6,"74":2,"75":2,"76":2,"77":4,"78":49,"79":49,"80":49,"81":59,"82":49,"83":49,"84":49,"85":49,"86":16,"87":16,"88":49,"89":2,"90":47,"91":49,"92":6,"93":43,"94":25,"95":49,"96":49,"97":26,"98":23,"99":49,"100":49,"101":33,"102":17,"103":16,"104":33,"105":49,"106":49,"107":20,"108":18,"109":18,"110":18,"111":29,"112":29,"113":23,"114":29,"115":29,"116":6,"117":6,"118":6,"119":8,"120":2,"121":4},"f":{"0":16,"1":32,"2":16,"3":78,"4":16,"5":49,"6":6},"b":{"0":[16,7],"1":[9,7],"2":[0,16],"3":[72,87],"4":[14,2],"5":[8,6],"6":[2,12],"7":[16,0],"8":[9,7],"9":[16,0],"10":[34,15],"11":[26,23],"12":[49,15],"13":[49,26],"14":[49,26],"15":[6,43],"16":[2,4],"17":[2,47],"18":[49,20],"19":[6,43],"20":[18,25],"21":[43,20],"22":[26,23],"23":[17,16],"24":[20,29],"25":[2,18],"26":[23,6],"27":[29,6],"28":[2,6]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ba7cbf6cddc7487cf85c26d510ddae94c84f2c9b"}
}

@@ -66,2 +66,10 @@ /* eslint-disable */

return function jump(event) {
if (
document.getElementById('fileSearch') === document.activeElement &&
document.activeElement != null
) {
// if we're currently focused on the search input, we don't want to navigate
return;
}
switch (event.which) {

@@ -68,0 +76,0 @@ case 78: // n

@@ -27,2 +27,27 @@ /* eslint-disable */

function onFilterInput() {
const searchValue = document.getElementById('fileSearch').value;
const rows = document.getElementsByTagName('tbody')[0].children;
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (
row.textContent
.toLowerCase()
.includes(searchValue.toLowerCase())
) {
row.style.display = '';
} else {
row.style.display = 'none';
}
}
}
// loads the search box
function addSearchBox() {
var template = document.getElementById('filterTemplate');
var templateClone = template.content.cloneNode(true);
templateClone.getElementById('fileSearch').oninput = onFilterInput;
template.parentElement.appendChild(templateClone);
}
// loads all columns

@@ -166,2 +191,3 @@ function loadColumns() {

loadData();
addSearchBox();
addSortIndicators();

@@ -168,0 +194,0 @@ enableUI();

@@ -1,2 +0,2 @@

/*! XmlBeautify v1.1.2 Copyright (c) 2019-2021 https://github.com/riversun(riversun.org@gmail.com) */
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.XmlBeautify=n():e.XmlBeautify=n()}(this,(function(){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var l=n[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,t),l.l=!0,l.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var l in e)t.d(r,l,function(n){return e[n]}.bind(null,l));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="/",t(t.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n,t){"use strict";function r(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.r(n),t.d(n,"default",(function(){return l}));var l=function(){function e(n){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e);var t=n||{};this.userExternalParser=!1,t.parser?(this.userExternalParser=!0,this.parser=new t.parser):this.parser=new DOMParser}var n,t,l;return n=e,(t=[{key:"hasXmlDef",value:function(e){return e.indexOf("<?xml")>=0}},{key:"getEncoding",value:function(e){if(!this.hasXmlDef(e))return null;var n=e.toLowerCase().indexOf('encoding="')+'encoding="'.length,t=e.indexOf('"?>');return e.substr(n,t-n)}},{key:"_children",value:function(e){for(var n=[],t=e.childNodes.length,r=0;r<t;r++)1===e.childNodes[r].nodeType&&n.push(e.childNodes[r]);return n}},{key:"beautify",value:function(e,n){var t=this,r=t.parser.parseFromString(e,"text/xml"),l=" ",a=!1;n&&(n.indent&&(l=n.indent),1==n.useSelfClosingElement&&(a=n.useSelfClosingElement));var i=null;t.hasXmlDef(e)&&(i='<?xml version="1.0" encoding="'+t.getEncoding(e)+'"?>');var o={indentText:l,xmlText:"",useSelfClosingElement:a,indentLevel:0};t.userExternalParser?t._parseInternally(this._children(r)[0],o):t._parseInternally(r.children[0],o);var u="";return i&&(u+=i+"\n"),u+=o.xmlText}},{key:"_parseInternally",value:function(e,n){var t,r=this,l=e.textContent;0==l.replace(/ /g,"").replace(/\r?\n/g,"").replace(/\n/g,"").replace(/\t/g,"").length&&(l=""),t=r.userExternalParser?!(r._children(e).length>0):!(e.children.length>0);var a=l&&l.length>0,i=t&&a,o=t&&!a,u=n.useSelfClosingElement,s="";i&&(s=l);for(var f,c="",d=0;d<n.indentLevel;d++)c+=n.indentText;n.xmlText+=c,n.xmlText+="<"+e.tagName;for(var x=0;x<e.attributes.length;x++){var p=e.attributes[x];n.xmlText+=" "+p.name+'="'+p.textContent+'"'}n.xmlText+=o&&u?" />":">",i?n.xmlText+=s:o&&!u||(n.xmlText+="\n"),n.indentLevel++,f=r.userExternalParser?r._children(e).length:e.children.length;for(var m=0;m<f;m++){var v=void 0;v=r.userExternalParser?r._children(e)[m]:e.children[m],r._parseInternally(v,n)}if(n.indentLevel--,o)if(u);else{var h="</"+e.tagName+">";n.xmlText+=h,n.xmlText+="\n"}else{var g="</"+e.tagName+">";t&&a||(n.xmlText+=c),n.xmlText+=g,n.xmlText+="\n"}}}])&&r(n.prototype,t),l&&r(n,l),e}()}]).default}));
/*! XmlBeautify v1.2.0 Copyright (c) 2019-2022 https://github.com/riversun(riversun.org@gmail.com) */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.XmlBeautify=t():e.XmlBeautify=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)n.d(r,l,function(t){return e[t]}.bind(null,l));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,"default",(function(){return l}));var l=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=t||{};this.userExternalParser=!1,n.parser?(this.userExternalParser=!0,this.parser=new n.parser):this.parser=new DOMParser}var t,n,l;return t=e,(n=[{key:"hasXmlDef",value:function(e){return e.indexOf("<?xml")>=0}},{key:"getEncoding",value:function(e){if(!this.hasXmlDef(e))return null;var t=e.toLowerCase().indexOf('encoding="')+'encoding="'.length,n=e.indexOf('"?>');return e.substr(t,n-t)}},{key:"_children",value:function(e){for(var t=[],n=e.childNodes.length,r=0;r<n;r++)1===e.childNodes[r].nodeType&&t.push(e.childNodes[r]);return t}},{key:"beautify",value:function(e,t){var n=this,r=n.parser.parseFromString(e,"text/xml"),l=" ",a=!1;t&&(t.indent&&(l=t.indent),1==t.useSelfClosingElement&&(a=t.useSelfClosingElement));var i=null;n.hasXmlDef(e)&&(i='<?xml version="1.0" encoding="'+n.getEncoding(e)+'"?>');var o={indentText:l,xmlText:"",useSelfClosingElement:a,indentLevel:0};n.userExternalParser?n._parseInternally(this._children(r)[0],o):n._parseInternally(r.children[0],o);var u="";return i&&(u+=i+"\n"),u+=o.xmlText}},{key:"_parseInternally",value:function(e,t){var n,r=this,l=e.textContent;0==l.replace(/ /g,"").replace(/\r?\n/g,"").replace(/\n/g,"").replace(/\t/g,"").length&&(l=""),n=r.userExternalParser?!(r._children(e).length>0):!(e.children.length>0);var a=l&&l.length>0,i=n&&a,o=n&&!a,u=t.useSelfClosingElement,s="";if(i){var f=r._getFirstCDATAChild(e),d=f.hasCDATAChild,c=f.data;d?(s+="<![CDATA[",s+=c,s+="]]>"):s+=l}for(var x,h="",p=0;p<t.indentLevel;p++)h+=t.indentText;t.xmlText+=h,t.xmlText+="<"+e.tagName;for(var v=0;v<e.attributes.length;v++){var m=e.attributes[v];t.xmlText+=" "+m.name+'="'+m.textContent+'"'}t.xmlText+=o&&u?" />":">",i?t.xmlText+=s:o&&!u||(t.xmlText+="\n"),t.indentLevel++,x=r.userExternalParser?r._children(e).length:e.children.length;for(var g=0;g<x;g++){var y=void 0;y=r.userExternalParser?r._children(e)[g]:e.children[g],r._parseInternally(y,t)}if(t.indentLevel--,o)if(u);else{var b="</"+e.tagName+">";t.xmlText+=b,t.xmlText+="\n"}else{var T="</"+e.tagName+">";n&&a||(t.xmlText+=h),t.xmlText+=T,t.xmlText+="\n"}}},{key:"_getFirstCDATAChild",value:function(e){for(var t=e.childNodes.length,n=0;n<t;n++)if(4===e.childNodes[n].nodeType)return{hasCDATAChild:!0,data:e.childNodes[n].data};return{hasCDATAChild:!1}}}])&&r(t.prototype,n),l&&r(t,l),Object.defineProperty(t,"prototype",{writable:!1}),e}()}]).default}));

@@ -20,8 +20,12 @@ /**

<element></element>
</element>
</element><foo>Here is a CDATA section: <![CDATA[ < > & ]]> with all kinds of unescaped text.</foo>
</body>
</example>`;
const beautifiedXmlText = new XmlBeautify({ parser: DOMParser }).beautify(srcXmlText);
const beautifiedXmlText = new XmlBeautify({ parser: DOMParser })
.beautify(srcXmlText, {
indent: " ", //indent pattern like white spaces
useSelfClosingElement: true //true:use self-closing element when empty element.
});
console.log(beautifiedXmlText);
{
"name": "xml-beautify",
"version": "1.1.2",
"version": "1.2.0",
"description": "XML pretty formatter that corresponds to the self-closing empty elements.",

@@ -23,11 +23,11 @@ "main": "dist/XmlBeautify.js",

"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.2",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"jest": "^26.6.3",
"@babel/core": "^7.17.8",
"@babel/preset-env": "^7.16.11",
"babel-jest": "^27.5.1",
"babel-loader": "^8.2.3",
"jest": "^27.5.1",
"npm-run-all": "^4.1.5",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2",
"webpack-dev-server": "^3.11.3",
"xmldom": "^0.6.0"

@@ -34,0 +34,0 @@ },

@@ -38,3 +38,3 @@ # xml-beautify

<element>value</element>
<element></element>
<element></element><foo><![CDATA[ < > & ]]></foo>
</element>

@@ -61,2 +61,3 @@ </body>

<element />
<foo><![CDATA[ < > & ]]></foo>
</element>

@@ -79,3 +80,3 @@ </body>

```
<script src="https://cdn.jsdelivr.net/npm/xml-beautify@1.1.1/dist/XmlBeautify.js"></script>
<script src="https://cdn.jsdelivr.net/npm/xml-beautify@1.1.2/dist/XmlBeautify.js"></script>
```

@@ -102,3 +103,3 @@

<body>
<script src="https://cdn.jsdelivr.net/npm/xml-beautify@1.1.1/dist/XmlBeautify.js"></script>
<script src="https://cdn.jsdelivr.net/npm/xml-beautify@1.1.2/dist/XmlBeautify.js"></script>
<script>

@@ -105,0 +106,0 @@ const srcXmlText = `<?xml version="1.0" encoding="utf-8"?><example version="2.0">

@@ -64,7 +64,12 @@ /*

/**
* Returns Array of ELEMENT_NODE-child
* @param element
* @returns {*[]}
* @private
*/
_children(element) {
const _ret = [];
const c = element.childNodes.length;
for (let i = 0; i < c; i++) {
const numOfChildNodes = element.childNodes.length;
for (let i = 0; i < numOfChildNodes; i++) {
if (element.childNodes[i].nodeType === ELEMENT_NODE) {

@@ -75,4 +80,2 @@ _ret.push(element.childNodes[i]);

return _ret;
}

@@ -126,4 +129,2 @@

return resultXml;
};

@@ -165,3 +166,10 @@

if (elementHasItsValue) {
valueOfElement = elementTextContent;
const { hasCDATAChild, data } = me._getFirstCDATAChild(element);
if (hasCDATAChild) {
valueOfElement += '<![CDATA[';
valueOfElement += data;
valueOfElement += ']]>';
} else {
valueOfElement += elementTextContent;
}
}

@@ -171,3 +179,2 @@

for (let idx = 0; idx < buildInfo.indentLevel; idx++) {

@@ -242,2 +249,22 @@ indentText += buildInfo.indentText;

};
/**
* Return the CDATA section in the first child element of element.
* If not exists, returns { hasCDATAChild:false }
* @param element
* @returns {*}
* @private
*/
_getFirstCDATAChild(element) {
const numOfChildNodes = element.childNodes.length;// numOfChildNodes should be 1
for (let i = 0; i < numOfChildNodes; i++) {
if (element.childNodes[i].nodeType === CDATA_SECTION_NODE) {
return { hasCDATAChild: true, data: element.childNodes[i].data };
}
}
return { hasCDATAChild: false };
}
}

@@ -54,3 +54,3 @@ const path = require('path');

plugins: [
new webpack.BannerPlugin(`[name] v${version} Copyright (c) 2019-2021 https://github.com/riversun(riversun.org@gmail.com)`),
new webpack.BannerPlugin(`[name] v${version} Copyright (c) 2019-2022 https://github.com/riversun(riversun.org@gmail.com)`),
],

@@ -57,0 +57,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc