datastore-api 4.0.0 → 4.0.3

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.
@@ -1,6 +1,6 @@
1
1
  import { AsyncLocalStorage } from 'async_hooks';
2
2
  import { setImmediate } from 'timers/promises';
3
- import { Datastore } from '@google-cloud/datastore';
3
+ import { Datastore, PropertyFilter } from '@google-cloud/datastore';
4
4
  export { Datastore, Key, Query, Transaction } from '@google-cloud/datastore';
5
5
  import { entity } from '@google-cloud/datastore/build/src/entity';
6
6
  import { assertIsObject, assertIsDefined, assert, assertIsArray, assertIsString, assertIsNumber } from 'assertate-debug';
@@ -9,304 +9,304 @@ import promClient from 'prom-client';
9
9
 
10
10
  function _regeneratorRuntime() {
11
11
  _regeneratorRuntime = function () {
12
- return exports;
12
+ return e;
13
13
  };
14
- var exports = {},
15
- Op = Object.prototype,
16
- hasOwn = Op.hasOwnProperty,
17
- defineProperty = Object.defineProperty || function (obj, key, desc) {
18
- obj[key] = desc.value;
14
+ var t,
15
+ e = {},
16
+ r = Object.prototype,
17
+ n = r.hasOwnProperty,
18
+ o = Object.defineProperty || function (t, e, r) {
19
+ t[e] = r.value;
19
20
  },
20
- $Symbol = "function" == typeof Symbol ? Symbol : {},
21
- iteratorSymbol = $Symbol.iterator || "@@iterator",
22
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
23
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
24
- function define(obj, key, value) {
25
- return Object.defineProperty(obj, key, {
26
- value: value,
21
+ i = "function" == typeof Symbol ? Symbol : {},
22
+ a = i.iterator || "@@iterator",
23
+ c = i.asyncIterator || "@@asyncIterator",
24
+ u = i.toStringTag || "@@toStringTag";
25
+ function define(t, e, r) {
26
+ return Object.defineProperty(t, e, {
27
+ value: r,
27
28
  enumerable: !0,
28
29
  configurable: !0,
29
30
  writable: !0
30
- }), obj[key];
31
+ }), t[e];
31
32
  }
32
33
  try {
33
34
  define({}, "");
34
- } catch (err) {
35
- define = function (obj, key, value) {
36
- return obj[key] = value;
35
+ } catch (t) {
36
+ define = function (t, e, r) {
37
+ return t[e] = r;
37
38
  };
38
39
  }
39
- function wrap(innerFn, outerFn, self, tryLocsList) {
40
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
41
- generator = Object.create(protoGenerator.prototype),
42
- context = new Context(tryLocsList || []);
43
- return defineProperty(generator, "_invoke", {
44
- value: makeInvokeMethod(innerFn, self, context)
45
- }), generator;
40
+ function wrap(t, e, r, n) {
41
+ var i = e && e.prototype instanceof Generator ? e : Generator,
42
+ a = Object.create(i.prototype),
43
+ c = new Context(n || []);
44
+ return o(a, "_invoke", {
45
+ value: makeInvokeMethod(t, r, c)
46
+ }), a;
46
47
  }
47
- function tryCatch(fn, obj, arg) {
48
+ function tryCatch(t, e, r) {
48
49
  try {
49
50
  return {
50
51
  type: "normal",
51
- arg: fn.call(obj, arg)
52
+ arg: t.call(e, r)
52
53
  };
53
- } catch (err) {
54
+ } catch (t) {
54
55
  return {
55
56
  type: "throw",
56
- arg: err
57
+ arg: t
57
58
  };
58
59
  }
59
60
  }
60
- exports.wrap = wrap;
61
- var ContinueSentinel = {};
61
+ e.wrap = wrap;
62
+ var h = "suspendedStart",
63
+ l = "suspendedYield",
64
+ f = "executing",
65
+ s = "completed",
66
+ y = {};
62
67
  function Generator() {}
63
68
  function GeneratorFunction() {}
64
69
  function GeneratorFunctionPrototype() {}
65
- var IteratorPrototype = {};
66
- define(IteratorPrototype, iteratorSymbol, function () {
70
+ var p = {};
71
+ define(p, a, function () {
67
72
  return this;
68
73
  });
69
- var getProto = Object.getPrototypeOf,
70
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
71
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
72
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
73
- function defineIteratorMethods(prototype) {
74
- ["next", "throw", "return"].forEach(function (method) {
75
- define(prototype, method, function (arg) {
76
- return this._invoke(method, arg);
74
+ var d = Object.getPrototypeOf,
75
+ v = d && d(d(values([])));
76
+ v && v !== r && n.call(v, a) && (p = v);
77
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
78
+ function defineIteratorMethods(t) {
79
+ ["next", "throw", "return"].forEach(function (e) {
80
+ define(t, e, function (t) {
81
+ return this._invoke(e, t);
77
82
  });
78
83
  });
79
84
  }
80
- function AsyncIterator(generator, PromiseImpl) {
81
- function invoke(method, arg, resolve, reject) {
82
- var record = tryCatch(generator[method], generator, arg);
83
- if ("throw" !== record.type) {
84
- var result = record.arg,
85
- value = result.value;
86
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
87
- invoke("next", value, resolve, reject);
88
- }, function (err) {
89
- invoke("throw", err, resolve, reject);
90
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
91
- result.value = unwrapped, resolve(result);
92
- }, function (error) {
93
- return invoke("throw", error, resolve, reject);
85
+ function AsyncIterator(t, e) {
86
+ function invoke(r, o, i, a) {
87
+ var c = tryCatch(t[r], t, o);
88
+ if ("throw" !== c.type) {
89
+ var u = c.arg,
90
+ h = u.value;
91
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
92
+ invoke("next", t, i, a);
93
+ }, function (t) {
94
+ invoke("throw", t, i, a);
95
+ }) : e.resolve(h).then(function (t) {
96
+ u.value = t, i(u);
97
+ }, function (t) {
98
+ return invoke("throw", t, i, a);
94
99
  });
95
100
  }
96
- reject(record.arg);
101
+ a(c.arg);
97
102
  }
98
- var previousPromise;
99
- defineProperty(this, "_invoke", {
100
- value: function (method, arg) {
103
+ var r;
104
+ o(this, "_invoke", {
105
+ value: function (t, n) {
101
106
  function callInvokeWithMethodAndArg() {
102
- return new PromiseImpl(function (resolve, reject) {
103
- invoke(method, arg, resolve, reject);
107
+ return new e(function (e, r) {
108
+ invoke(t, n, e, r);
104
109
  });
105
110
  }
106
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
111
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
107
112
  }
108
113
  });
109
114
  }
110
- function makeInvokeMethod(innerFn, self, context) {
111
- var state = "suspendedStart";
112
- return function (method, arg) {
113
- if ("executing" === state) throw new Error("Generator is already running");
114
- if ("completed" === state) {
115
- if ("throw" === method) throw arg;
116
- return doneResult();
115
+ function makeInvokeMethod(e, r, n) {
116
+ var o = h;
117
+ return function (i, a) {
118
+ if (o === f) throw new Error("Generator is already running");
119
+ if (o === s) {
120
+ if ("throw" === i) throw a;
121
+ return {
122
+ value: t,
123
+ done: !0
124
+ };
117
125
  }
118
- for (context.method = method, context.arg = arg;;) {
119
- var delegate = context.delegate;
120
- if (delegate) {
121
- var delegateResult = maybeInvokeDelegate(delegate, context);
122
- if (delegateResult) {
123
- if (delegateResult === ContinueSentinel) continue;
124
- return delegateResult;
126
+ for (n.method = i, n.arg = a;;) {
127
+ var c = n.delegate;
128
+ if (c) {
129
+ var u = maybeInvokeDelegate(c, n);
130
+ if (u) {
131
+ if (u === y) continue;
132
+ return u;
125
133
  }
126
134
  }
127
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
128
- if ("suspendedStart" === state) throw state = "completed", context.arg;
129
- context.dispatchException(context.arg);
130
- } else "return" === context.method && context.abrupt("return", context.arg);
131
- state = "executing";
132
- var record = tryCatch(innerFn, self, context);
133
- if ("normal" === record.type) {
134
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
135
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
136
+ if (o === h) throw o = s, n.arg;
137
+ n.dispatchException(n.arg);
138
+ } else "return" === n.method && n.abrupt("return", n.arg);
139
+ o = f;
140
+ var p = tryCatch(e, r, n);
141
+ if ("normal" === p.type) {
142
+ if (o = n.done ? s : l, p.arg === y) continue;
135
143
  return {
136
- value: record.arg,
137
- done: context.done
144
+ value: p.arg,
145
+ done: n.done
138
146
  };
139
147
  }
140
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
148
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
141
149
  }
142
150
  };
143
151
  }
144
- function maybeInvokeDelegate(delegate, context) {
145
- var methodName = context.method,
146
- method = delegate.iterator[methodName];
147
- if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
148
- var record = tryCatch(method, delegate.iterator, context.arg);
149
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
150
- var info = record.arg;
151
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
152
+ function maybeInvokeDelegate(e, r) {
153
+ var n = r.method,
154
+ o = e.iterator[n];
155
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
156
+ var i = tryCatch(o, e.iterator, r.arg);
157
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
158
+ var a = i.arg;
159
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
152
160
  }
153
- function pushTryEntry(locs) {
154
- var entry = {
155
- tryLoc: locs[0]
161
+ function pushTryEntry(t) {
162
+ var e = {
163
+ tryLoc: t[0]
156
164
  };
157
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
165
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
158
166
  }
159
- function resetTryEntry(entry) {
160
- var record = entry.completion || {};
161
- record.type = "normal", delete record.arg, entry.completion = record;
167
+ function resetTryEntry(t) {
168
+ var e = t.completion || {};
169
+ e.type = "normal", delete e.arg, t.completion = e;
162
170
  }
163
- function Context(tryLocsList) {
171
+ function Context(t) {
164
172
  this.tryEntries = [{
165
173
  tryLoc: "root"
166
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
174
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
167
175
  }
168
- function values(iterable) {
169
- if (iterable) {
170
- var iteratorMethod = iterable[iteratorSymbol];
171
- if (iteratorMethod) return iteratorMethod.call(iterable);
172
- if ("function" == typeof iterable.next) return iterable;
173
- if (!isNaN(iterable.length)) {
174
- var i = -1,
175
- next = function next() {
176
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
177
- return next.value = undefined, next.done = !0, next;
176
+ function values(e) {
177
+ if (e || "" === e) {
178
+ var r = e[a];
179
+ if (r) return r.call(e);
180
+ if ("function" == typeof e.next) return e;
181
+ if (!isNaN(e.length)) {
182
+ var o = -1,
183
+ i = function next() {
184
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
185
+ return next.value = t, next.done = !0, next;
178
186
  };
179
- return next.next = next;
187
+ return i.next = i;
180
188
  }
181
189
  }
182
- return {
183
- next: doneResult
184
- };
185
- }
186
- function doneResult() {
187
- return {
188
- value: undefined,
189
- done: !0
190
- };
190
+ throw new TypeError(typeof e + " is not iterable");
191
191
  }
192
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
192
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
193
193
  value: GeneratorFunctionPrototype,
194
194
  configurable: !0
195
- }), defineProperty(GeneratorFunctionPrototype, "constructor", {
195
+ }), o(GeneratorFunctionPrototype, "constructor", {
196
196
  value: GeneratorFunction,
197
197
  configurable: !0
198
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
199
- var ctor = "function" == typeof genFun && genFun.constructor;
200
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
201
- }, exports.mark = function (genFun) {
202
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
203
- }, exports.awrap = function (arg) {
198
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
199
+ var e = "function" == typeof t && t.constructor;
200
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
201
+ }, e.mark = function (t) {
202
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
203
+ }, e.awrap = function (t) {
204
204
  return {
205
- __await: arg
205
+ __await: t
206
206
  };
207
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
207
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
208
208
  return this;
209
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
210
- void 0 === PromiseImpl && (PromiseImpl = Promise);
211
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
212
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
213
- return result.done ? result.value : iter.next();
209
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
210
+ void 0 === i && (i = Promise);
211
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
212
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
213
+ return t.done ? t.value : a.next();
214
214
  });
215
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
215
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
216
216
  return this;
217
- }), define(Gp, "toString", function () {
217
+ }), define(g, "toString", function () {
218
218
  return "[object Generator]";
219
- }), exports.keys = function (val) {
220
- var object = Object(val),
221
- keys = [];
222
- for (var key in object) keys.push(key);
223
- return keys.reverse(), function next() {
224
- for (; keys.length;) {
225
- var key = keys.pop();
226
- if (key in object) return next.value = key, next.done = !1, next;
219
+ }), e.keys = function (t) {
220
+ var e = Object(t),
221
+ r = [];
222
+ for (var n in e) r.push(n);
223
+ return r.reverse(), function next() {
224
+ for (; r.length;) {
225
+ var t = r.pop();
226
+ if (t in e) return next.value = t, next.done = !1, next;
227
227
  }
228
228
  return next.done = !0, next;
229
229
  };
230
- }, exports.values = values, Context.prototype = {
230
+ }, e.values = values, Context.prototype = {
231
231
  constructor: Context,
232
- reset: function (skipTempReset) {
233
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
232
+ reset: function (e) {
233
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
234
234
  },
235
235
  stop: function () {
236
236
  this.done = !0;
237
- var rootRecord = this.tryEntries[0].completion;
238
- if ("throw" === rootRecord.type) throw rootRecord.arg;
237
+ var t = this.tryEntries[0].completion;
238
+ if ("throw" === t.type) throw t.arg;
239
239
  return this.rval;
240
240
  },
241
- dispatchException: function (exception) {
242
- if (this.done) throw exception;
243
- var context = this;
244
- function handle(loc, caught) {
245
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
241
+ dispatchException: function (e) {
242
+ if (this.done) throw e;
243
+ var r = this;
244
+ function handle(n, o) {
245
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
246
246
  }
247
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
248
- var entry = this.tryEntries[i],
249
- record = entry.completion;
250
- if ("root" === entry.tryLoc) return handle("end");
251
- if (entry.tryLoc <= this.prev) {
252
- var hasCatch = hasOwn.call(entry, "catchLoc"),
253
- hasFinally = hasOwn.call(entry, "finallyLoc");
254
- if (hasCatch && hasFinally) {
255
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
256
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
257
- } else if (hasCatch) {
258
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
247
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
248
+ var i = this.tryEntries[o],
249
+ a = i.completion;
250
+ if ("root" === i.tryLoc) return handle("end");
251
+ if (i.tryLoc <= this.prev) {
252
+ var c = n.call(i, "catchLoc"),
253
+ u = n.call(i, "finallyLoc");
254
+ if (c && u) {
255
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
256
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
257
+ } else if (c) {
258
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
259
259
  } else {
260
- if (!hasFinally) throw new Error("try statement without catch or finally");
261
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
260
+ if (!u) throw new Error("try statement without catch or finally");
261
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
262
262
  }
263
263
  }
264
264
  }
265
265
  },
266
- abrupt: function (type, arg) {
267
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
268
- var entry = this.tryEntries[i];
269
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
270
- var finallyEntry = entry;
266
+ abrupt: function (t, e) {
267
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
268
+ var o = this.tryEntries[r];
269
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
270
+ var i = o;
271
271
  break;
272
272
  }
273
273
  }
274
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
275
- var record = finallyEntry ? finallyEntry.completion : {};
276
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
274
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
275
+ var a = i ? i.completion : {};
276
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
277
277
  },
278
- complete: function (record, afterLoc) {
279
- if ("throw" === record.type) throw record.arg;
280
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
278
+ complete: function (t, e) {
279
+ if ("throw" === t.type) throw t.arg;
280
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
281
281
  },
282
- finish: function (finallyLoc) {
283
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
284
- var entry = this.tryEntries[i];
285
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
282
+ finish: function (t) {
283
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
284
+ var r = this.tryEntries[e];
285
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
286
286
  }
287
287
  },
288
- catch: function (tryLoc) {
289
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
290
- var entry = this.tryEntries[i];
291
- if (entry.tryLoc === tryLoc) {
292
- var record = entry.completion;
293
- if ("throw" === record.type) {
294
- var thrown = record.arg;
295
- resetTryEntry(entry);
288
+ catch: function (t) {
289
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
290
+ var r = this.tryEntries[e];
291
+ if (r.tryLoc === t) {
292
+ var n = r.completion;
293
+ if ("throw" === n.type) {
294
+ var o = n.arg;
295
+ resetTryEntry(r);
296
296
  }
297
- return thrown;
297
+ return o;
298
298
  }
299
299
  }
300
300
  throw new Error("illegal catch attempt");
301
301
  },
302
- delegateYield: function (iterable, resultName, nextLoc) {
302
+ delegateYield: function (e, r, n) {
303
303
  return this.delegate = {
304
- iterator: values(iterable),
305
- resultName: resultName,
306
- nextLoc: nextLoc
307
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
304
+ iterator: values(e),
305
+ resultName: r,
306
+ nextLoc: n
307
+ }, "next" === this.method && (this.arg = t), y;
308
308
  }
309
- }, exports;
309
+ }, e;
310
310
  }
311
311
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
312
312
  try {
@@ -397,7 +397,11 @@ function _construct(Parent, args, Class) {
397
397
  return _construct.apply(null, arguments);
398
398
  }
399
399
  function _isNativeFunction(fn) {
400
- return Function.toString.call(fn).indexOf("[native code]") !== -1;
400
+ try {
401
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
402
+ } catch (e) {
403
+ return typeof fn === "function";
404
+ }
401
405
  }
402
406
  function _wrapNativeSuper(Class) {
403
407
  var _cache = typeof Map === "function" ? new Map() : undefined;
@@ -1216,7 +1220,7 @@ var Dstore = /*#__PURE__*/function () {
1216
1220
  filterSpec = _step3.value;
1217
1221
  assertIsObject(filterSpec);
1218
1222
  // @ts-ignore
1219
- q.filter.apply(q, filterSpec);
1223
+ q.filter(_construct(PropertyFilter, filterSpec));
1220
1224
  }
1221
1225
  for (_iterator4 = _createForOfIteratorHelperLoose(ordering); !(_step4 = _iterator4()).done;) {
1222
1226
  orderField = _step4.value;
@@ -1385,7 +1389,7 @@ var Dstore = /*#__PURE__*/function () {
1385
1389
  var DstoreError = /*#__PURE__*/function (_Error) {
1386
1390
  _inheritsLoose(DstoreError, _Error);
1387
1391
  function DstoreError(message, originalError, extensions) {
1388
- var _this2$stack, _originalError$stack, _originalError$stack$, _originalError$stack$2, _this2$stack2, _this2$stack2$split, _this2$stack2$split$s;
1392
+ var _this2$stack, _originalError$stack, _this2$stack2;
1389
1393
  var _this2;
1390
1394
  _this2 = _Error.call(this, message + ": " + (originalError == null ? void 0 : originalError.message)) || this;
1391
1395
  // if no name provided, use the default. defineProperty ensures that it stays non-enumerable
@@ -1399,7 +1403,7 @@ var DstoreError = /*#__PURE__*/function (_Error) {
1399
1403
  // metadata: Metadata { internalRepr: Map(0) {}, options: {} },
1400
1404
  _this2.originalError = originalError;
1401
1405
  _this2.extensions = _extends({}, extensions);
1402
- _this2.stack = (((_this2$stack = _this2.stack) == null ? void 0 : _this2$stack.split('\n')[0]) || '') + '\n' + ((originalError == null ? void 0 : (_originalError$stack = originalError.stack) == null ? void 0 : (_originalError$stack$ = _originalError$stack.split('\n')) == null ? void 0 : (_originalError$stack$2 = _originalError$stack$.slice(1)) == null ? void 0 : _originalError$stack$2.join('\n')) || '') + '\n' + (((_this2$stack2 = _this2.stack) == null ? void 0 : (_this2$stack2$split = _this2$stack2.split('\n')) == null ? void 0 : (_this2$stack2$split$s = _this2$stack2$split.slice(1)) == null ? void 0 : _this2$stack2$split$s.join('\n')) || '');
1406
+ _this2.stack = (((_this2$stack = _this2.stack) == null ? void 0 : _this2$stack.split('\n')[0]) || '') + '\n' + ((originalError == null || (_originalError$stack = originalError.stack) == null || (_originalError$stack = _originalError$stack.split('\n')) == null || (_originalError$stack = _originalError$stack.slice(1)) == null ? void 0 : _originalError$stack.join('\n')) || '') + '\n' + (((_this2$stack2 = _this2.stack) == null || (_this2$stack2 = _this2$stack2.split('\n')) == null || (_this2$stack2 = _this2$stack2.slice(1)) == null ? void 0 : _this2$stack2.join('\n')) || '');
1403
1407
  // These are usually present on Datastore Errors
1404
1408
  // logger.error({ err: originalError, extensions }, message);
1405
1409
  return _this2;