xml-beautifier
Advanced tools
Comparing version 0.2.0 to 0.3.0
'use strict'; | ||
var repeat = require('repeat-string'); | ||
var splitOnTags = function splitOnTags(str) { | ||
@@ -33,3 +35,3 @@ return str.split(/(<\/?[^>]+>)/g).filter(function (line) { | ||
var line = indent.repeat(depth) + item; | ||
var line = repeat(indent, depth) + item; | ||
@@ -42,2 +44,2 @@ if (isOpeningTag(item)) { | ||
}).join('\n'); | ||
}; | ||
}; |
{ | ||
"name": "xml-beautifier", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"title": "XML Beautifier", | ||
@@ -8,5 +8,6 @@ "description": "Beautifies XML documents by putting each tag and text node on their own line and correctly indents everything", | ||
"scripts": { | ||
"build": "babel index.js --out-file dist/index.js --presets es2015", | ||
"build": "babel src --out-dir dist --presets es2015", | ||
"prepublish": "npm run build", | ||
"test": "node test.js" | ||
"pretest": "npm run prepublish", | ||
"test": "node dist/test/test.js" | ||
}, | ||
@@ -17,5 +18,2 @@ "repository": { | ||
}, | ||
"engines": { | ||
"node": ">=4.0.0" | ||
}, | ||
"author": "Jonathan Persson <persson.jonathan@gmail.com>", | ||
@@ -27,3 +25,6 @@ "license": "MIT", | ||
"tape": "^4.2.2" | ||
}, | ||
"dependencies": { | ||
"repeat-string": "^1.5.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6143
107
1
+ Addedrepeat-string@^1.5.2
+ Addedrepeat-string@1.6.1(transitive)