New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ls-age/xml

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ls-age/xml - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

test/.eslintrc

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="0.1.3"></a>
## [0.1.3](https://github.com/ls-age/xml/compare/v0.1.2...v0.1.3) (2017-07-04)
### Features
* **Parser:** Fail without document element ([6babc8e](https://github.com/ls-age/xml/commit/6babc8e))
<a name="0.1.2"></a>

@@ -7,0 +17,0 @@ ## [0.1.2](https://github.com/ls-age/xml/compare/v0.1.1...v0.1.2) (2017-07-04)

29

docs/api/coverage.json
{
"coverage": "0%",
"expectCount": 74,
"expectCount": 75,
"actualCount": 0,

@@ -10,9 +10,9 @@ "files": {

"undocumentLines": [
4,
31,
6,
33,
8,
19,
11,
15,
9
17,
9,
13,
7
]

@@ -96,14 +96,15 @@ },

"src/lib/Parser.js": {
"expectCount": 9,
"expectCount": 10,
"actualCount": 0,
"undocumentLines": [
26,
34,
70,
28,
60,
117,
113,
108,
89,
68,
73,
46
95,
78,
82,
52
]

@@ -110,0 +111,0 @@ },

{
"name": "@ls-age/xml",
"version": "0.1.2",
"version": "0.1.3",
"description": "Modify XML documents in node.js with ease",

@@ -10,4 +10,5 @@ "main": "out/index.js",

"docs": "esdoc",
"lint": "eslint src/**/*.js",
"prepublishOnly": "npm run -s compile && npm run -s docs",
"test": "echo \"Error: no test specified\" && exit 0"
"test": "mocha test/**/*.spec.js"
},

@@ -32,8 +33,15 @@ "repository": {

"homepage": "https://github.com/ls-age/xml#readme",
"dependencies": {
"sax": "^1.2.2"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.5.2",
"babel-register": "^6.24.1",
"esdoc": "^0.5.2",
"esdoc-uploader": "^1.0.1",
"eslint": "^4.0.0",
"eslint-config-lsage": "^0.1.0"
"eslint-config-lsage": "^0.2.0",
"mocha": "^3.4.2",
"unexpected": "^10.31.0"
},

@@ -54,7 +62,3 @@ "eslintConfig": {

]
},
"dependencies": {
"prettify-xml": "^1.2.0",
"sax": "^1.2.2"
}
}

@@ -495,2 +495,8 @@ window.esdocSearchIndex = [

[
"src/lib/parser.js~parser.defaultoptions",
"class/src/lib/Parser.js~Parser.html#static-get-defaultOptions",
"src/lib/Parser.js~Parser.defaultOptions",
"member"
],
[
"src/lib/dom/cdatasection.js",

@@ -497,0 +503,0 @@ "file/src/lib/dom/CDataSection.js.html",

@@ -6,9 +6,2 @@ 'use strict';

});
var _prettifyXml = require('prettify-xml');
var _prettifyXml2 = _interopRequireDefault(_prettifyXml);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const build = Symbol('Builder.build');

@@ -49,9 +42,3 @@ const selfClosing = Symbol('Builder.isSelfClosing');

build(doc) {
const xml = doc[build](Object.assign({}, this._options, { level: 0 }));
/* if (this._options) {
return prettify(xml, this._options);
} */
return xml;
return doc[build](Object.assign({}, this._options, { level: 0 }));
}

@@ -58,0 +45,0 @@

@@ -51,2 +51,8 @@ 'use strict';

static get defaultOptions() {
return {
strict: true
};
}
constructor(options = {}) {

@@ -77,2 +83,6 @@ this._options = Object.assign({}, Parser.defaultOptions, options);

if (this._rootElement === null) {
reject(new Error('No document element'));
}
resolve(new _Document2.default({

@@ -95,3 +105,2 @@ root: this._rootElement,

this._processingInstructions.push(pi);
console.log('<?' + pi.name, pi.body, '?>');
}

@@ -109,6 +118,3 @@

}, this));
console.log(' '.repeat(this._indent) + '#text');
}
// console.log('TEXT', text);
}

@@ -132,8 +138,6 @@

this._currentElement = elm;
console.log(' '.repeat(this._indent++) + '<' + tag.name + '>');
}
onCloseTag(tag) {
onCloseTag() {
this._currentElement = this._currentElement.parentNode;
console.log(' '.repeat(--this._indent) + '</' + tag + '>');
}

@@ -146,3 +150,2 @@

}, this));
console.log(' '.repeat(this._indent) + '#cdata', cdata);
}

@@ -149,0 +152,0 @@

{
"name": "@ls-age/xml",
"version": "0.1.2",
"version": "0.1.3",
"description": "Modify XML documents in node.js with ease",

@@ -10,4 +10,5 @@ "main": "out/index.js",

"docs": "esdoc",
"lint": "eslint src/**/*.js",
"prepublishOnly": "npm run -s compile && npm run -s docs",
"test": "echo \"Error: no test specified\" && exit 0"
"test": "mocha test/**/*.spec.js"
},

@@ -32,8 +33,15 @@ "repository": {

"homepage": "https://github.com/ls-age/xml#readme",
"dependencies": {
"sax": "^1.2.2"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.5.2",
"babel-register": "^6.24.1",
"esdoc": "^0.5.2",
"esdoc-uploader": "^1.0.1",
"eslint": "^4.0.0",
"eslint-config-lsage": "^0.1.0"
"eslint-config-lsage": "^0.2.0",
"mocha": "^3.4.2",
"unexpected": "^10.31.0"
},

@@ -54,7 +62,3 @@ "eslintConfig": {

]
},
"dependencies": {
"prettify-xml": "^1.2.0",
"sax": "^1.2.2"
}
}

@@ -1,3 +0,1 @@

import prettify from 'prettify-xml';
const build = Symbol('Builder.build');

@@ -34,11 +32,5 @@ const selfClosing = Symbol('Builder.isSelfClosing');

build(doc) {
const xml = doc[build](Object.assign({}, this._options, { level: 0 }));
/* if (this._options) {
return prettify(xml, this._options);
} */
return xml;
return doc[build](Object.assign({}, this._options, { level: 0 }));
}
}

@@ -28,2 +28,8 @@ import { parser as createParser } from 'sax';

static get defaultOptions() {
return {
strict: true,
};
}
constructor(options = {}) {

@@ -54,2 +60,6 @@ this._options = Object.assign({}, Parser.defaultOptions, options);

if (this._rootElement === null) {
reject(new Error('No document element'));
}
resolve(new Document({

@@ -72,3 +82,2 @@ root: this._rootElement,

this._processingInstructions.push(pi);
console.log('<?' + pi.name, pi.body, '?>');
}

@@ -86,6 +95,3 @@

}, this));
console.log(' '.repeat(this._indent) + '#text');
}
// console.log('TEXT', text);
}

@@ -109,8 +115,6 @@

this._currentElement = elm;
console.log(' '.repeat(this._indent++) + '<' + tag.name + '>');
}
onCloseTag(tag) {
onCloseTag() {
this._currentElement = this._currentElement.parentNode;
console.log(' '.repeat(--this._indent) + '</' + tag + '>');
}

@@ -123,5 +127,4 @@

}, this));
console.log(' '.repeat(this._indent) + '#cdata', cdata);
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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 too big to display

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