Skip to content

Commit 1a6b484

Browse files
authored
style: simplify internal lib universal-node-xml (#622)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 652224b commit 1a6b484

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

libs/universal-node-xml/index.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ SPDX-License-Identifier: Apache-2.0
1717
Copyright (c) OWASP Foundation. All Rights Reserved.
1818
*/
1919

20+
const possibleStringifiers = [
21+
// prioritized list of possible implementations
22+
'xmlbuilder2'
23+
]
24+
25+
/* c8 ignore start */
2026
module.exports.stringify = function () {
21-
/* c8 ignore start */
2227
throw new Error(
2328
'No stringifier available. Please install any of the optional xml libraries: ' +
2429
possibleStringifiers.join(', ')
2530
)
26-
/* c8 ignore end */
2731
}
28-
29-
const possibleStringifiers = [
30-
// prioritized list of possible implementations
31-
'xmlbuilder2'
32-
]
32+
/* c8 ignore end */
3333

3434
for (const file of possibleStringifiers) {
3535
try {

libs/universal-node-xml/stringifiers/xmlbuilder2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Copyright (c) OWASP Foundation. All Rights Reserved.
1818
*/
1919

2020
const { create } = require('xmlbuilder2')
21-
const { getNS, makeIndent } = require('./helpers')
21+
const { getNS, makeIndent } = require('./_helpers')
2222

2323
module.exports = typeof create === 'function'
2424
? stringify

0 commit comments

Comments
 (0)