Comparing version 1.3.1 to 1.4.0
{ | ||
"name": "aqb", | ||
"license": "APACHE2_0", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "ArangoDB AQL query builder.", | ||
@@ -27,3 +27,3 @@ "keywords": [ | ||
"scripts": { | ||
"test": "./node_modules/.bin/mocha --growl -R spec test/**/*.js" | ||
"test": "./node_modules/.bin/mocha --growl -R spec test test/**" | ||
}, | ||
@@ -30,0 +30,0 @@ "repository": { |
@@ -26,3 +26,3 @@ /* jshint globalstrict: true, es3: true */ | ||
} | ||
if (typeof token === 'number') { | ||
if (typeof token === 'number' && token === token && token !== Infinity && token !== -Infinity) { | ||
if (Math.floor(token) === token) { | ||
@@ -53,4 +53,4 @@ return new IntegerLiteral(token); | ||
if (typeof token === 'object') { | ||
if (Object.prototype.toString.call(token) === '[object ArangoCollection]') { | ||
return new Identifier(token.name); | ||
if (token.constructor && token.constructor.name === 'ArangoCollection') { | ||
return new Identifier(token.name()); | ||
} | ||
@@ -62,3 +62,3 @@ if (Object.prototype.toString.call(token) === '[object Array]') { | ||
} | ||
throw new AqlError('Invalid type for an AQL value: ' + (typeof token)); | ||
throw new AqlError('Invalid AQL value: (' + (typeof token) + ') ' + token); | ||
} | ||
@@ -65,0 +65,0 @@ |
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
59878