New:Socket for Asana Is Now Available.Learn more
Get Started

nice-xml

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nice-xml - npm Package Compare versions

Comparing version
0.1.1-rc2
to
0.1.1
+1
-1
lib/index.js

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

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.3
var Parser, Serializer, parse, stringify;

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

@@ -1,5 +0,5 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.3
var COMMON_CHAR_RANGE, Events, Lexer, NAME_CHAR_RANGE, Range, SPACE_CHAR_RANGE, START_CHAR_RANGE,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;

@@ -14,12 +14,11 @@ Events = require('events');

}
/*COMMON_CHAR_RANGE = Range.union(
new Range('\x01', '\ud7ff')
new Range('\ue000', '\ufffd')
* [#x10000-#x10FFFF]
)
*/
};
/*COMMON_CHAR_RANGE = Range.union(
new Range('\x01', '\ud7ff')
new Range('\ue000', '\ufffd')
# [#x10000-#x10FFFF]
)
*/
COMMON_CHAR_RANGE = {

@@ -29,29 +28,28 @@ has: function() {

}
/*START_CHAR_RANGE = Range.union(
':', '_'
new Range('A', 'Z')
new Range('a', 'z')
new Range('\xc0', '\xd6')
new Range('\xd8', '\xf6')
new Range('\u00f8', '\u02ff')
* new Range('\0300', '\u036f') Combining Diacritical Marks
new Range('\u0370', '\u037d')
* '\u037e' Greek Question Mark
new Range('\u037f', '\u1fff')
new Range('\u200c', '\u200d')
new Range('\u2070', '\u218f')
new Range('\u2c00', '\u2fef')
new Range('\u3001', '\ud7ff')
new Range('\uf900', '\ufdcf')
new Range('\ufdf0', '\ufffd')
* [#x10000-#xEFFFF]
)
*/
};
/*START_CHAR_RANGE = Range.union(
':', '_'
new Range('A', 'Z')
new Range('a', 'z')
new Range('\xc0', '\xd6')
new Range('\xd8', '\xf6')
new Range('\u00f8', '\u02ff')
# new Range('\0300', '\u036f') Combining Diacritical Marks
new Range('\u0370', '\u037d')
# '\u037e' Greek Question Mark
new Range('\u037f', '\u1fff')
new Range('\u200c', '\u200d')
new Range('\u2070', '\u218f')
new Range('\u2c00', '\u2fef')
new Range('\u3001', '\ud7ff')
new Range('\uf900', '\ufdcf')
new Range('\ufdf0', '\ufffd')
# [#x10000-#xEFFFF]
)
*/
START_CHAR_RANGE = {

@@ -61,14 +59,13 @@ has: function(char) {

}
/*NAME_CHAR_RANGE = START_CHAR_RANGE.union(
'-', '.', '\xb7'
new Range('0', '9')
new Range('\u0300', '\u036f')
new Range('\u203f', '\u2040')
)
*/
};
/*NAME_CHAR_RANGE = START_CHAR_RANGE.union(
'-', '.', '\xb7'
new Range('0', '9')
new Range('\u0300', '\u036f')
new Range('\u203f', '\u2040')
)
*/
NAME_CHAR_RANGE = {

@@ -80,6 +77,6 @@ has: function(char) {

Lexer = (function(_super) {
Lexer = (function(superClass) {
var STATES;
__extends(Lexer, _super);
extend(Lexer, superClass);

@@ -86,0 +83,0 @@ STATES = {

@@ -1,4 +0,4 @@

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.3
var Parser, SAX,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };

@@ -9,6 +9,6 @@ SAX = require('sax');

function Parser(options) {
this._onCDATA = __bind(this._onCDATA, this);
this._onText = __bind(this._onText, this);
this._onCloseTag = __bind(this._onCloseTag, this);
this._onOpenTag = __bind(this._onOpenTag, this);
this._onCDATA = bind(this._onCDATA, this);
this._onText = bind(this._onText, this);
this._onCloseTag = bind(this._onCloseTag, this);
this._onOpenTag = bind(this._onOpenTag, this);
this._empty = options.empty;

@@ -47,4 +47,4 @@ this._tree = null;

Parser.prototype._onCloseTag = function(name) {
var prev, tag, _ref;
_ref = this._stack.pop(), tag = _ref[0], prev = _ref[1];
var prev, ref, tag;
ref = this._stack.pop(), tag = ref[0], prev = ref[1];
if (prev[tag] == null) {

@@ -62,6 +62,6 @@ prev[tag] = this._current;

Parser.prototype._onText = function(value) {
var char, isGarbage, _i, _len;
var char, i, isGarbage, len;
isGarbage = true;
for (_i = 0, _len = value.length; _i < _len; _i++) {
char = value[_i];
for (i = 0, len = value.length; i < len; i++) {
char = value[i];
if (char !== '\n' && char !== '\t' && char !== ' ') {

@@ -68,0 +68,0 @@ isGarbage = false;

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

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.3
var Range;

@@ -6,6 +6,6 @@

Range.union = function() {
var data, range, result, _i, _len;
var data, i, len, range, result;
data = [];
for (_i = 0, _len = arguments.length; _i < _len; _i++) {
range = arguments[_i];
for (i = 0, len = arguments.length; i < len; i++) {
range = arguments[i];
if (typeof range === 'object') {

@@ -34,6 +34,6 @@ data.push([range._data.start, range._data.finish]);

Range.prototype.has = function(value) {
var item, _i, _len, _ref;
_ref = this._data;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
item = _ref[_i];
var i, item, len, ref;
ref = this._data;
for (i = 0, len = ref.length; i < len; i++) {
item = ref[i];
if (value >= item[0] && value <= item[1]) {

@@ -40,0 +40,0 @@ return true;

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

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.3
var Serializer, Writer;

@@ -32,5 +32,5 @@

Serializer.prototype._processArray = function(key, data) {
var value, _i, _len;
for (_i = 0, _len = data.length; _i < _len; _i++) {
value = data[_i];
var i, len, value;
for (i = 0, len = data.length; i < len; i++) {
value = data[i];
this._processAny(key, value);

@@ -37,0 +37,0 @@ }

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

// Generated by CoffeeScript 1.6.3
// Generated by CoffeeScript 1.9.3
var Writer;

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

{
"name": "nice-xml",
"version": "0.1.1-rc2",
"version": "0.1.1",
"description": "XML to JS native objects bidirectional converver",

@@ -5,0 +5,0 @@ "keywords": ["xml", "converter", "parser"],

@@ -8,3 +8,3 @@ #! /usr/bin/env coffee

text = '<!--Love--><!----><!--Only one-->'
text = '<hello><status>0</status><test>Data</test><item name="cat"/><item>Yes</item><item/></hello>'
text = '<hello id="12345">My Love<![CDATA[ Only]]><test>Data</test><item name="cat"/><item>Yes</item><item/></hello>'

@@ -11,0 +11,0 @@ data = XML.parse(text)