Skip to content

Commit

Permalink
Fixed vulnerabilities by updating dep packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen van der Heijden committed Jun 5, 2019
1 parent bd9cda4 commit 176ef0b
Show file tree
Hide file tree
Showing 3 changed files with 659 additions and 1,071 deletions.
20 changes: 10 additions & 10 deletions lib/jsleri.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ var List = function List(element, delimiter, _min, _max, opt) {
_min = this.args[2];
_max = this.args[3];
opt = this.args[4];
if (!(element instanceof Jsleri)) throw '(Jsleri-->List) first argument must be an instance of Jsleri; got ' + (0, _typeof2.default)(element);
if (typeof delimiter !== 'string' && !(delimiter instanceof Jsleri)) throw '(Jsleri-->List) second argument must be a string or instance of Jsleri; got ' + (0, _typeof2.default)(delimiter);
if (!(element instanceof Jsleri)) throw '(Jsleri-->List) first argument must be an instance of Jsleri; got ' + (0, _typeof2["default"])(element);
if (typeof delimiter !== 'string' && !(delimiter instanceof Jsleri)) throw '(Jsleri-->List) second argument must be a string or instance of Jsleri; got ' + (0, _typeof2["default"])(delimiter);
this.element = element;
this.delimiter = delimiter instanceof Jsleri ? delimiter : new Token(delimiter);
this.min = _min === undefined || _min === null ? 0 : _min;
Expand All @@ -348,7 +348,7 @@ function Optional(element) {
var obj = Jsleri.call(this, Optional, arguments);
if (obj) return obj;
element = this.args[0];
if (!(element instanceof Jsleri)) throw '(Jsleri-->Optional) first argument must be an instance of Jsleri; got ' + (0, _typeof2.default)(element);
if (!(element instanceof Jsleri)) throw '(Jsleri-->Optional) first argument must be an instance of Jsleri; got ' + (0, _typeof2["default"])(element);
this.element = element;
}

Expand Down Expand Up @@ -392,7 +392,7 @@ function Repeat(element, _min, _max) {
element = this.args[0];
_min = this.args[1];
_max = this.args[2];
if (!(element instanceof Jsleri)) throw '(Jsleri-->Repeat) first argument must be an instance of Jsleri; got ' + (0, _typeof2.default)(element);
if (!(element instanceof Jsleri)) throw '(Jsleri-->Repeat) first argument must be an instance of Jsleri; got ' + (0, _typeof2["default"])(element);
this.element = element;
this.min = _min === undefined || _min === null ? 0 : _min;
this.max = _max === undefined || _max === null ? null : _max;
Expand All @@ -405,8 +405,8 @@ Repeat.prototype.constructor = Repeat;
**************************************************************************/

var refSet = function refSet(element) {
if (!(element instanceof Jsleri)) throw '(Jsleri-->Ref-->set) first argument must be an instance of Jsleri; got ' + (0, _typeof2.default)(element);
(0, _extends2.default)(this, element);
if (!(element instanceof Jsleri)) throw '(Jsleri-->Ref-->set) first argument must be an instance of Jsleri; got ' + (0, _typeof2["default"])(element);
(0, _extends2["default"])(this, element);
};

function Ref(Cls) {
Expand All @@ -433,7 +433,7 @@ function Grammar(element, reKeywords) {
element = this.args[0];
reKeywords = this.args[1];
element = element === undefined ? this.constructor.START : element;
if (!(element instanceof Jsleri)) throw '(Jsleri-->Optional) first argument must be an instance of Jsleri; got ' + (0, _typeof2.default)(element);
if (!(element instanceof Jsleri)) throw '(Jsleri-->Optional) first argument must be an instance of Jsleri; got ' + (0, _typeof2["default"])(element);
this.reKeywords = reKeywords === undefined ? RE_KEYWORDS : buildReKeywords(reKeywords);
this.element = element;

Expand All @@ -455,7 +455,7 @@ function Rule(element) {
var obj = Jsleri.call(this, Rule, arguments);
if (obj) return obj;
element = this.args[0];
if (!(element instanceof Jsleri)) throw '(Jsleri-->Rule) first argument must be an instance of Jsleri; got ' + (0, _typeof2.default)(element);
if (!(element instanceof Jsleri)) throw '(Jsleri-->Rule) first argument must be an instance of Jsleri; got ' + (0, _typeof2["default"])(element);
this.element = element;
}

Expand Down Expand Up @@ -494,7 +494,7 @@ function Token(token) {
var obj = Jsleri.call(this, Token, arguments);
if (obj) return obj;
token = this.args[0];
if (typeof token !== 'string') throw '(Jsleri-->Token) first argument must be a string; got ' + (0, _typeof2.default)(token);
if (typeof token !== 'string') throw '(Jsleri-->Token) first argument must be a string; got ' + (0, _typeof2["default"])(token);
this.token = token;
}

Expand All @@ -508,7 +508,7 @@ function Tokens(tokens) {
var obj = Jsleri.call(this, Tokens, arguments);
if (obj) return obj;
tokens = this.args[0];
if (typeof tokens !== 'string') throw '(Jsleri-->Tokens) first argument must be a string; got ' + (0, _typeof2.default)(tokens);
if (typeof tokens !== 'string') throw '(Jsleri-->Tokens) first argument must be a string; got ' + (0, _typeof2["default"])(tokens);
this.tokens = tokens.trim().split(RE_WHITESPACE).sort(sortOnStrLen);
}

Expand Down

0 comments on commit 176ef0b

Please sign in to comment.