Socket
Socket
Sign inDemoInstall

aqb

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aqb - npm Package Compare versions

Comparing version 1.8.0 to 1.8.1

2

package.json
{
"name": "aqb",
"version": "1.8.0",
"version": "1.8.1",
"description": "ArangoDB AQL query builder.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -179,2 +179,4 @@ # ArangoDB Query Builder

* `foo1.bar2`
* `` `foo`.bar ``
* `` foo.`bar` ``

@@ -186,3 +188,2 @@ Invalid values:

* `foo bar`
* `foo-bar`
* `foo[bar]`

@@ -189,0 +190,0 @@

@@ -55,3 +55,3 @@ /*jshint browserify: true */

if (obj.constructor && obj.constructor.name === 'ArangoCollection') {
return new Identifier(obj.name());
return new Identifier(obj);
}

@@ -230,3 +230,9 @@ if (Array.isArray(obj)) {

function Identifier(value) {
if (value && value instanceof Identifier) {value = value.value;}
if (value) {
if (value.constructor && value.constructor.name === 'ArangoCollection') {
value = value.name();
} else if (value instanceof Identifier) {
value = value.value;
}
}
if (!value || typeof value !== 'string') {

@@ -240,3 +246,3 @@ throw new AqlError('Expected value to be a string: ' + value);

}
Identifier.re = /^[_a-z][-_0-9a-z]*$/i;
Identifier.re = /^[_@a-z][-_@0-9a-z]*$/i;
Identifier.prototype = new Expression();

@@ -246,10 +252,16 @@ Identifier.prototype.constructor = Identifier;

var value = String(this.value);
if (keywords.indexOf(value.toLowerCase()) === -1 && value.indexOf('-') === -1) {
return value;
if (keywords.indexOf(value.toLowerCase()) !== -1 || value.indexOf('-') !== -1) {
return '`' + value + '`';
}
return '`' + value + '`';
return value;
};
function SimpleReference(value) {
if (value && value instanceof SimpleReference) {value = value.value;}
if (value) {
if (value.constructor && value.constructor.name === 'ArangoCollection') {
value = value.name();
} else if (value instanceof SimpleReference) {
value = value.value;
}
}
if (!value || typeof value !== 'string') {

@@ -263,3 +275,3 @@ throw new AqlError('Expected value to be a string: ' + value);

}
SimpleReference.re = /^@{0,2}[_a-z][_0-9a-z]*(\.[_a-z][_0-9a-z]*|\[\*\])*$/i;
SimpleReference.re = /^([_@a-z][-_@0-9a-z]*|`[_@a-z][-_@0-9a-z]*`)(\.[_@a-z][-_@0-9a-z]*|\.`[_@a-z][-_@0-9a-z]*`|\[\*\])*$/i;
SimpleReference.prototype = new Expression();

@@ -269,4 +281,7 @@ SimpleReference.prototype.constructor = SimpleReference;

var value = String(this.value);
var tokens = value.split('.').map(function (token) {
return keywords.indexOf(token) === -1 ? token : '`' + token + '`';
var tokens = value.split('.').map(function (token, i) {
if (token.charAt(0) !== '`' && (keywords.indexOf(token.toLowerCase()) !== -1 || token.indexOf('-') !== -1)) {
return '`' + token + '`';
}
return token;
});

@@ -273,0 +288,0 @@ return tokens.join('.');

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