Comparing version 0.0.3 to 0.0.4
@@ -23,4 +23,4 @@ /** | ||
this.logicalOperator = 'and'; | ||
if (src) | ||
this.add(src); | ||
if (arguments.length > 0) | ||
this.add.apply(this, arguments); | ||
} | ||
@@ -31,3 +31,3 @@ | ||
let arg = arguments[i]; | ||
if (!arg.isCondition || arg.isConditionGroup) | ||
if (!(arg.isCondition || arg.isConditionGroup)) | ||
throw new Error('Only array of Condition instance allowed'); | ||
@@ -34,0 +34,0 @@ this._items.push(arg); |
@@ -88,3 +88,3 @@ /** | ||
throw new Error('Invalid arguments'); | ||
let item = Array.isArray(field) ? new ConditionGroup(field) : | ||
let item = Array.isArray(field) ? Reflect.construct(ConditionGroup, field) : | ||
Reflect.construct(Condition, Array.prototype.slice.call(arguments, 1)); | ||
@@ -91,0 +91,0 @@ item.logicalOperator = logicalOperator; |
{ | ||
"name": "sqb", | ||
"description": "Lightweight, multi-dialect SQL query builder for JavaScript", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"author": "Panates Ltd.", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
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
27673