@sqlitecloud/drivers 1.0.406 → 1.0.422

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,6 +124,8 @@ function getUpdateResults(results) {
124
124
  * containing the arguments array with the callbacks removed (if any), and the callback itself.
125
125
  * If there are multiple callbacks, the first one is returned as 'callback' and the last one
126
126
  * as 'completeCallback'.
127
+ *
128
+ * @returns args is a simple list of SQLiteCloudDataTypes, we flat them into a single array
127
129
  */
128
130
  function popCallback(args) {
129
131
  const remaining = args;
@@ -131,11 +133,11 @@ function popCallback(args) {
131
133
  if (args && args.length > 0 && typeof args[args.length - 1] === 'function') {
132
134
  // at least 2 callbacks?
133
135
  if (args.length > 1 && typeof args[args.length - 2] === 'function') {
134
- return { args: remaining.slice(0, -2), callback: args[args.length - 2], complete: args[args.length - 1] };
136
+ return { args: remaining.slice(0, -2).flat(), callback: args[args.length - 2], complete: args[args.length - 1] };
135
137
  }
136
- return { args: remaining.slice(0, -1), callback: args[args.length - 1] };
138
+ return { args: remaining.slice(0, -1).flat(), callback: args[args.length - 1] };
137
139
  }
138
- return { args: remaining };
140
+ return { args: remaining.flat() };
139
141
  }
140
142
  //
141
143
  // configuration validation