NPM Dependencies UPDATE

This commit is contained in:
Luis Fernando Molina committed 2018-05-02 10:21:21 +02:00
1 parent 20c29bb4d6
commit a9bfe7a413
599 files changed
+12369 -51423

No files matched your search

+29 -20
View File
@@ -1,9 +1,9 @@
// Generated by CoffeeScript 1.6.1
// Generated by CoffeeScript 1.6.3
(function() {
var events, isEmpty, sax,
__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; },
_this = this;
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
sax = require('sax');
@@ -55,7 +55,6 @@
};
exports.ValidationError = (function(_super) {
__extends(ValidationError, _super);
function ValidationError(message) {
@@ -67,18 +66,15 @@
})(Error);
exports.Parser = (function(_super) {
__extends(Parser, _super);
function Parser(opts) {
var key, value, _ref,
_this = this;
this.parseString = function(str, cb) {
return Parser.prototype.parseString.apply(_this, arguments);
};
this.reset = function() {
return Parser.prototype.reset.apply(_this, arguments);
};
this.parseString = __bind(this.parseString, this);
this.reset = __bind(this.reset, this);
var key, value, _ref;
if (!(this instanceof exports.Parser)) {
return new exports.Parser(opts);
}
this.options = {};
_ref = exports.defaults["0.2"];
for (key in _ref) {
@@ -98,7 +94,7 @@
}
Parser.prototype.reset = function() {
var attrkey, charkey, err, stack,
var attrkey, charkey, err, ontext, stack,
_this = this;
this.removeAllListeners();
this.saxParser = sax.parser(this.options.strict, {
@@ -146,12 +142,15 @@
return stack.push(obj);
};
this.saxParser.onclosetag = function() {
var node, nodeName, obj, old, s, xpath;
var cdata, emptyStr, node, nodeName, obj, old, s, xpath;
obj = stack.pop();
nodeName = obj["#name"];
delete obj["#name"];
cdata = obj.cdata;
delete obj.cdata;
s = stack[stack.length - 1];
if (obj[charkey].match(/^\s*$/)) {
if (obj[charkey].match(/^\s*$/) && !cdata) {
emptyStr = obj[charkey];
delete obj[charkey];
} else {
if (_this.options.trim) {
@@ -164,8 +163,8 @@
obj = obj[charkey];
}
}
if ((isEmpty(obj)) && stack.length > 0) {
obj = _this.options.emptyTag !== void 0 ? _this.options.emptyTag : '';
if (isEmpty(obj)) {
obj = _this.options.emptyTag !== void 0 ? _this.options.emptyTag : emptyStr;
}
if (_this.options.validator != null) {
xpath = "/" + ((function() {
@@ -179,7 +178,8 @@
})()).concat(nodeName).join("/");
try {
obj = _this.options.validator(xpath, s && s[nodeName], obj);
} catch (err) {
} catch (_error) {
err = _error;
_this.emit("error", err);
}
}
@@ -225,11 +225,20 @@
return _this.emit("end", _this.resultObject);
}
};
return this.saxParser.ontext = this.saxParser.oncdata = function(text) {
ontext = function(text) {
var s;
s = stack[stack.length - 1];
if (s) {
return s[charkey] += text;
s[charkey] += text;
return s;
}
};
this.saxParser.ontext = ontext;
return this.saxParser.oncdata = function(text) {
var s;
s = ontext(text);
if (s) {
return s.cdata = true;
}
};
};