parse 3.5.0-alpha.3 → 3.5.0-alpha.4

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.
Files changed (47) hide show
  1. package/dist/parse.js +5703 -2369
  2. package/dist/parse.min.js +2 -2
  3. package/dist/parse.weapp.js +5701 -2367
  4. package/dist/parse.weapp.min.js +2 -2
  5. package/lib/browser/CoreManager.js +1 -1
  6. package/lib/browser/EventuallyQueue.js +395 -29
  7. package/lib/browser/LiveQueryClient.js +2 -6
  8. package/lib/browser/LocalDatastore.js +392 -18
  9. package/lib/browser/LocalDatastoreController.js +391 -21
  10. package/lib/browser/LocalDatastoreController.react-native.js +387 -23
  11. package/lib/browser/ParseFile.js +388 -22
  12. package/lib/browser/ParseLiveQuery.js +381 -18
  13. package/lib/browser/ParseObject.js +405 -41
  14. package/lib/browser/ParseOp.js +1 -3
  15. package/lib/browser/ParseQuery.js +396 -47
  16. package/lib/browser/ParseUser.js +388 -14
  17. package/lib/browser/StorageController.react-native.js +6 -18
  18. package/lib/node/CoreManager.js +1 -1
  19. package/lib/node/ParseObject.js +6 -6
  20. package/lib/node/ParseQuery.js +1 -3
  21. package/lib/react-native/CoreManager.js +1 -1
  22. package/lib/react-native/EventuallyQueue.js +376 -27
  23. package/lib/react-native/LiveQueryClient.js +2 -6
  24. package/lib/react-native/LocalDatastore.js +374 -26
  25. package/lib/react-native/LocalDatastoreController.js +365 -16
  26. package/lib/react-native/LocalDatastoreController.react-native.js +363 -14
  27. package/lib/react-native/ParseFile.js +359 -16
  28. package/lib/react-native/ParseLiveQuery.js +357 -8
  29. package/lib/react-native/ParseObject.js +385 -38
  30. package/lib/react-native/ParseOp.js +1 -3
  31. package/lib/react-native/ParseQuery.js +374 -39
  32. package/lib/react-native/ParseUser.js +368 -19
  33. package/lib/react-native/StorageController.react-native.js +6 -18
  34. package/lib/weapp/CoreManager.js +1 -1
  35. package/lib/weapp/EventuallyQueue.js +395 -29
  36. package/lib/weapp/LiveQueryClient.js +2 -6
  37. package/lib/weapp/LocalDatastore.js +392 -18
  38. package/lib/weapp/LocalDatastoreController.js +391 -21
  39. package/lib/weapp/LocalDatastoreController.react-native.js +387 -23
  40. package/lib/weapp/ParseFile.js +388 -22
  41. package/lib/weapp/ParseLiveQuery.js +381 -18
  42. package/lib/weapp/ParseObject.js +405 -41
  43. package/lib/weapp/ParseOp.js +1 -3
  44. package/lib/weapp/ParseQuery.js +396 -47
  45. package/lib/weapp/ParseUser.js +388 -14
  46. package/lib/weapp/StorageController.react-native.js +6 -18
  47. package/package.json +1 -1
@@ -9,8 +9,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
9
9
 
10
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
11
11
 
12
- var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
13
-
14
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
13
 
16
14
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -31,6 +29,357 @@ var _OfflineQuery = _interopRequireDefault(require("./OfflineQuery"));
31
29
 
32
30
  var _LocalDatastoreUtils = require("./LocalDatastoreUtils");
33
31
 
32
+ function _regeneratorRuntime() {
33
+ "use strict";
34
+
35
+ _regeneratorRuntime = function () {
36
+ return exports;
37
+ };
38
+
39
+ var exports = {},
40
+ Op = Object.prototype,
41
+ hasOwn = Op.hasOwnProperty,
42
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
43
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
44
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
45
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
46
+
47
+ function define(obj, key, value) {
48
+ return Object.defineProperty(obj, key, {
49
+ value: value,
50
+ enumerable: !0,
51
+ configurable: !0,
52
+ writable: !0
53
+ }), obj[key];
54
+ }
55
+
56
+ try {
57
+ define({}, "");
58
+ } catch (err) {
59
+ define = function (obj, key, value) {
60
+ return obj[key] = value;
61
+ };
62
+ }
63
+
64
+ function wrap(innerFn, outerFn, self, tryLocsList) {
65
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
66
+ generator = Object.create(protoGenerator.prototype),
67
+ context = new Context(tryLocsList || []);
68
+ return generator._invoke = function (innerFn, self, context) {
69
+ var state = "suspendedStart";
70
+ return function (method, arg) {
71
+ if ("executing" === state) throw new Error("Generator is already running");
72
+
73
+ if ("completed" === state) {
74
+ if ("throw" === method) throw arg;
75
+ return doneResult();
76
+ }
77
+
78
+ for (context.method = method, context.arg = arg;;) {
79
+ var delegate = context.delegate;
80
+
81
+ if (delegate) {
82
+ var delegateResult = maybeInvokeDelegate(delegate, context);
83
+
84
+ if (delegateResult) {
85
+ if (delegateResult === ContinueSentinel) continue;
86
+ return delegateResult;
87
+ }
88
+ }
89
+
90
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
91
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
92
+ context.dispatchException(context.arg);
93
+ } else "return" === context.method && context.abrupt("return", context.arg);
94
+ state = "executing";
95
+ var record = tryCatch(innerFn, self, context);
96
+
97
+ if ("normal" === record.type) {
98
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
99
+ return {
100
+ value: record.arg,
101
+ done: context.done
102
+ };
103
+ }
104
+
105
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
106
+ }
107
+ };
108
+ }(innerFn, self, context), generator;
109
+ }
110
+
111
+ function tryCatch(fn, obj, arg) {
112
+ try {
113
+ return {
114
+ type: "normal",
115
+ arg: fn.call(obj, arg)
116
+ };
117
+ } catch (err) {
118
+ return {
119
+ type: "throw",
120
+ arg: err
121
+ };
122
+ }
123
+ }
124
+
125
+ exports.wrap = wrap;
126
+ var ContinueSentinel = {};
127
+
128
+ function Generator() {}
129
+
130
+ function GeneratorFunction() {}
131
+
132
+ function GeneratorFunctionPrototype() {}
133
+
134
+ var IteratorPrototype = {};
135
+ define(IteratorPrototype, iteratorSymbol, function () {
136
+ return this;
137
+ });
138
+ var getProto = Object.getPrototypeOf,
139
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
140
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
141
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
142
+
143
+ function defineIteratorMethods(prototype) {
144
+ ["next", "throw", "return"].forEach(function (method) {
145
+ define(prototype, method, function (arg) {
146
+ return this._invoke(method, arg);
147
+ });
148
+ });
149
+ }
150
+
151
+ function AsyncIterator(generator, PromiseImpl) {
152
+ function invoke(method, arg, resolve, reject) {
153
+ var record = tryCatch(generator[method], generator, arg);
154
+
155
+ if ("throw" !== record.type) {
156
+ var result = record.arg,
157
+ value = result.value;
158
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
159
+ invoke("next", value, resolve, reject);
160
+ }, function (err) {
161
+ invoke("throw", err, resolve, reject);
162
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
163
+ result.value = unwrapped, resolve(result);
164
+ }, function (error) {
165
+ return invoke("throw", error, resolve, reject);
166
+ });
167
+ }
168
+
169
+ reject(record.arg);
170
+ }
171
+
172
+ var previousPromise;
173
+
174
+ this._invoke = function (method, arg) {
175
+ function callInvokeWithMethodAndArg() {
176
+ return new PromiseImpl(function (resolve, reject) {
177
+ invoke(method, arg, resolve, reject);
178
+ });
179
+ }
180
+
181
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
182
+ };
183
+ }
184
+
185
+ function maybeInvokeDelegate(delegate, context) {
186
+ var method = delegate.iterator[context.method];
187
+
188
+ if (undefined === method) {
189
+ if (context.delegate = null, "throw" === context.method) {
190
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
191
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
192
+ }
193
+
194
+ return ContinueSentinel;
195
+ }
196
+
197
+ var record = tryCatch(method, delegate.iterator, context.arg);
198
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
199
+ var info = record.arg;
200
+ 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);
201
+ }
202
+
203
+ function pushTryEntry(locs) {
204
+ var entry = {
205
+ tryLoc: locs[0]
206
+ };
207
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
208
+ }
209
+
210
+ function resetTryEntry(entry) {
211
+ var record = entry.completion || {};
212
+ record.type = "normal", delete record.arg, entry.completion = record;
213
+ }
214
+
215
+ function Context(tryLocsList) {
216
+ this.tryEntries = [{
217
+ tryLoc: "root"
218
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
219
+ }
220
+
221
+ function values(iterable) {
222
+ if (iterable) {
223
+ var iteratorMethod = iterable[iteratorSymbol];
224
+ if (iteratorMethod) return iteratorMethod.call(iterable);
225
+ if ("function" == typeof iterable.next) return iterable;
226
+
227
+ if (!isNaN(iterable.length)) {
228
+ var i = -1,
229
+ next = function next() {
230
+ for (; ++i < iterable.length;) {
231
+ if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
232
+ }
233
+
234
+ return next.value = undefined, next.done = !0, next;
235
+ };
236
+
237
+ return next.next = next;
238
+ }
239
+ }
240
+
241
+ return {
242
+ next: doneResult
243
+ };
244
+ }
245
+
246
+ function doneResult() {
247
+ return {
248
+ value: undefined,
249
+ done: !0
250
+ };
251
+ }
252
+
253
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
254
+ var ctor = "function" == typeof genFun && genFun.constructor;
255
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
256
+ }, exports.mark = function (genFun) {
257
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
258
+ }, exports.awrap = function (arg) {
259
+ return {
260
+ __await: arg
261
+ };
262
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
263
+ return this;
264
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
265
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
266
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
267
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
268
+ return result.done ? result.value : iter.next();
269
+ });
270
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
271
+ return this;
272
+ }), define(Gp, "toString", function () {
273
+ return "[object Generator]";
274
+ }), exports.keys = function (object) {
275
+ var keys = [];
276
+
277
+ for (var key in object) {
278
+ keys.push(key);
279
+ }
280
+
281
+ return keys.reverse(), function next() {
282
+ for (; keys.length;) {
283
+ var key = keys.pop();
284
+ if (key in object) return next.value = key, next.done = !1, next;
285
+ }
286
+
287
+ return next.done = !0, next;
288
+ };
289
+ }, exports.values = values, Context.prototype = {
290
+ constructor: Context,
291
+ reset: function (skipTempReset) {
292
+ 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) {
293
+ "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
294
+ }
295
+ },
296
+ stop: function () {
297
+ this.done = !0;
298
+ var rootRecord = this.tryEntries[0].completion;
299
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
300
+ return this.rval;
301
+ },
302
+ dispatchException: function (exception) {
303
+ if (this.done) throw exception;
304
+ var context = this;
305
+
306
+ function handle(loc, caught) {
307
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
308
+ }
309
+
310
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
311
+ var entry = this.tryEntries[i],
312
+ record = entry.completion;
313
+ if ("root" === entry.tryLoc) return handle("end");
314
+
315
+ if (entry.tryLoc <= this.prev) {
316
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
317
+ hasFinally = hasOwn.call(entry, "finallyLoc");
318
+
319
+ if (hasCatch && hasFinally) {
320
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
321
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
322
+ } else if (hasCatch) {
323
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
324
+ } else {
325
+ if (!hasFinally) throw new Error("try statement without catch or finally");
326
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
327
+ }
328
+ }
329
+ }
330
+ },
331
+ abrupt: function (type, arg) {
332
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
333
+ var entry = this.tryEntries[i];
334
+
335
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
336
+ var finallyEntry = entry;
337
+ break;
338
+ }
339
+ }
340
+
341
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
342
+ var record = finallyEntry ? finallyEntry.completion : {};
343
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
344
+ },
345
+ complete: function (record, afterLoc) {
346
+ if ("throw" === record.type) throw record.arg;
347
+ 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;
348
+ },
349
+ finish: function (finallyLoc) {
350
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
351
+ var entry = this.tryEntries[i];
352
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
353
+ }
354
+ },
355
+ catch: function (tryLoc) {
356
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
357
+ var entry = this.tryEntries[i];
358
+
359
+ if (entry.tryLoc === tryLoc) {
360
+ var record = entry.completion;
361
+
362
+ if ("throw" === record.type) {
363
+ var thrown = record.arg;
364
+ resetTryEntry(entry);
365
+ }
366
+
367
+ return thrown;
368
+ }
369
+ }
370
+
371
+ throw new Error("illegal catch attempt");
372
+ },
373
+ delegateYield: function (iterable, resultName, nextLoc) {
374
+ return this.delegate = {
375
+ iterator: values(iterable),
376
+ resultName: resultName,
377
+ nextLoc: nextLoc
378
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
379
+ }
380
+ }, exports;
381
+ }
382
+
34
383
  function quote(s) {
35
384
  return '\\Q' + s.replace('\\E', '\\E\\\\E\\Q') + '\\E';
36
385
  }
@@ -236,7 +585,7 @@ var ParseQuery = function () {
236
585
  var _this2 = this;
237
586
 
238
587
  var localDatastore, objects, results, keys, alwaysSelectedKeys, sorts, count, limit;
239
- return _regenerator.default.async(function (_context) {
588
+ return _regeneratorRuntime().async(function (_context) {
240
589
  while (1) {
241
590
  switch (_context.prev = _context.next) {
242
591
  case 0:
@@ -244,7 +593,7 @@ var ParseQuery = function () {
244
593
 
245
594
  localDatastore = _CoreManager.default.getLocalDatastore();
246
595
  _context.next = 4;
247
- return _regenerator.default.awrap(localDatastore._serializeObjectsFromPinName(this._localDatastorePinName));
596
+ return _regeneratorRuntime().awrap(localDatastore._serializeObjectsFromPinName(this._localDatastorePinName));
248
597
 
249
598
  case 4:
250
599
  objects = _context.sent;
@@ -552,13 +901,13 @@ var ParseQuery = function () {
552
901
  key: "findAll",
553
902
  value: function (options) {
554
903
  var result;
555
- return _regenerator.default.async(function (_context2) {
904
+ return _regeneratorRuntime().async(function (_context2) {
556
905
  while (1) {
557
906
  switch (_context2.prev = _context2.next) {
558
907
  case 0:
559
908
  result = [];
560
909
  _context2.next = 3;
561
- return _regenerator.default.awrap(this.eachBatch(function (objects) {
910
+ return _regeneratorRuntime().awrap(this.eachBatch(function (objects) {
562
911
  result = [].concat((0, _toConsumableArray2.default)(result), (0, _toConsumableArray2.default)(objects));
563
912
  }, options));
564
913
 
@@ -663,8 +1012,6 @@ var ParseQuery = function () {
663
1012
  }, {
664
1013
  key: "first",
665
1014
  value: function (options) {
666
- var _this4 = this;
667
-
668
1015
  options = options || {};
669
1016
  var findOptions = {};
670
1017
 
@@ -706,7 +1053,7 @@ var ParseQuery = function () {
706
1053
  }
707
1054
 
708
1055
  if (!objects[0].className) {
709
- objects[0].className = _this4.className;
1056
+ objects[0].className = this.className;
710
1057
  }
711
1058
 
712
1059
  if (select) {
@@ -789,12 +1136,12 @@ var ParseQuery = function () {
789
1136
  }, function () {
790
1137
  var _await$Promise$all, _await$Promise$all2, results;
791
1138
 
792
- return _regenerator.default.async(function (_context3) {
1139
+ return _regeneratorRuntime().async(function (_context3) {
793
1140
  while (1) {
794
1141
  switch (_context3.prev = _context3.next) {
795
1142
  case 0:
796
1143
  _context3.next = 2;
797
- return _regenerator.default.awrap(Promise.all([query.find(findOptions), Promise.resolve(previousResults.length > 0 && callback(previousResults))]));
1144
+ return _regeneratorRuntime().awrap(Promise.all([query.find(findOptions), Promise.resolve(previousResults.length > 0 && callback(previousResults))]));
798
1145
 
799
1146
  case 2:
800
1147
  _await$Promise$all = _context3.sent;
@@ -818,7 +1165,7 @@ var ParseQuery = function () {
818
1165
  }
819
1166
 
820
1167
  _context3.next = 13;
821
- return _regenerator.default.awrap(Promise.resolve(callback(results)));
1168
+ return _regeneratorRuntime().awrap(Promise.resolve(callback(results)));
822
1169
 
823
1170
  case 13:
824
1171
  finished = true;
@@ -874,18 +1221,16 @@ var ParseQuery = function () {
874
1221
  }, {
875
1222
  key: "map",
876
1223
  value: function (callback, options) {
877
- var _this5 = this;
878
-
879
1224
  var array, index;
880
- return _regenerator.default.async(function (_context4) {
1225
+ return _regeneratorRuntime().async(function (_context4) {
881
1226
  while (1) {
882
1227
  switch (_context4.prev = _context4.next) {
883
1228
  case 0:
884
1229
  array = [];
885
1230
  index = 0;
886
1231
  _context4.next = 4;
887
- return _regenerator.default.awrap(this.each(function (object) {
888
- return Promise.resolve(callback(object, index, _this5)).then(function (result) {
1232
+ return _regeneratorRuntime().awrap(this.each(function (object) {
1233
+ return Promise.resolve(callback(object, index, this)).then(function (result) {
889
1234
  array.push(result);
890
1235
  index += 1;
891
1236
  });
@@ -905,14 +1250,14 @@ var ParseQuery = function () {
905
1250
  key: "reduce",
906
1251
  value: function (callback, initialValue, options) {
907
1252
  var accumulator, index;
908
- return _regenerator.default.async(function (_context5) {
1253
+ return _regeneratorRuntime().async(function (_context5) {
909
1254
  while (1) {
910
1255
  switch (_context5.prev = _context5.next) {
911
1256
  case 0:
912
1257
  accumulator = initialValue;
913
1258
  index = 0;
914
1259
  _context5.next = 4;
915
- return _regenerator.default.awrap(this.each(function (object) {
1260
+ return _regeneratorRuntime().awrap(this.each(function (object) {
916
1261
  if (index === 0 && initialValue === undefined) {
917
1262
  accumulator = object;
918
1263
  index += 1;
@@ -946,18 +1291,16 @@ var ParseQuery = function () {
946
1291
  }, {
947
1292
  key: "filter",
948
1293
  value: function (callback, options) {
949
- var _this6 = this;
950
-
951
1294
  var array, index;
952
- return _regenerator.default.async(function (_context6) {
1295
+ return _regeneratorRuntime().async(function (_context6) {
953
1296
  while (1) {
954
1297
  switch (_context6.prev = _context6.next) {
955
1298
  case 0:
956
1299
  array = [];
957
1300
  index = 0;
958
1301
  _context6.next = 4;
959
- return _regenerator.default.awrap(this.each(function (object) {
960
- return Promise.resolve(callback(object, index, _this6)).then(function (flag) {
1302
+ return _regeneratorRuntime().awrap(this.each(function (object) {
1303
+ return Promise.resolve(callback(object, index, this)).then(function (flag) {
961
1304
  if (flag) {
962
1305
  array.push(object);
963
1306
  }
@@ -979,15 +1322,13 @@ var ParseQuery = function () {
979
1322
  }, {
980
1323
  key: "equalTo",
981
1324
  value: function (key, value) {
982
- var _this7 = this;
983
-
984
1325
  if (key && typeof key === 'object') {
985
1326
  Object.entries(key).forEach(function (_ref) {
986
1327
  var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
987
1328
  k = _ref2[0],
988
1329
  val = _ref2[1];
989
1330
 
990
- return _this7.equalTo(k, val);
1331
+ return this.equalTo(k, val);
991
1332
  });
992
1333
  return this;
993
1334
  }
@@ -1002,15 +1343,13 @@ var ParseQuery = function () {
1002
1343
  }, {
1003
1344
  key: "notEqualTo",
1004
1345
  value: function (key, value) {
1005
- var _this8 = this;
1006
-
1007
1346
  if (key && typeof key === 'object') {
1008
1347
  Object.entries(key).forEach(function (_ref3) {
1009
1348
  var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
1010
1349
  k = _ref4[0],
1011
1350
  val = _ref4[1];
1012
1351
 
1013
- return _this8.notEqualTo(k, val);
1352
+ return this.notEqualTo(k, val);
1014
1353
  });
1015
1354
  return this;
1016
1355
  }
@@ -1060,15 +1399,13 @@ var ParseQuery = function () {
1060
1399
  }, {
1061
1400
  key: "containsAllStartingWith",
1062
1401
  value: function (key, values) {
1063
- var _this = this;
1064
-
1065
1402
  if (!Array.isArray(values)) {
1066
1403
  values = [values];
1067
1404
  }
1068
1405
 
1069
1406
  var regexObject = values.map(function (value) {
1070
1407
  return {
1071
- $regex: _this._regexStartWith(value)
1408
+ $regex: this._regexStartWith(value)
1072
1409
  };
1073
1410
  });
1074
1411
  return this.containsAll(key, regexObject);
@@ -1454,12 +1791,12 @@ var ParseQuery = function () {
1454
1791
  key: "subscribe",
1455
1792
  value: function (sessionToken) {
1456
1793
  var currentUser, liveQueryClient, subscription;
1457
- return _regenerator.default.async(function (_context7) {
1794
+ return _regeneratorRuntime().async(function (_context7) {
1458
1795
  while (1) {
1459
1796
  switch (_context7.prev = _context7.next) {
1460
1797
  case 0:
1461
1798
  _context7.next = 2;
1462
- return _regenerator.default.awrap(_CoreManager.default.getUserController().currentUserAsync());
1799
+ return _regeneratorRuntime().awrap(_CoreManager.default.getUserController().currentUserAsync());
1463
1800
 
1464
1801
  case 2:
1465
1802
  currentUser = _context7.sent;
@@ -1469,7 +1806,7 @@ var ParseQuery = function () {
1469
1806
  }
1470
1807
 
1471
1808
  _context7.next = 6;
1472
- return _regenerator.default.awrap(_CoreManager.default.getLiveQueryController().getDefaultLiveQueryClient());
1809
+ return _regeneratorRuntime().awrap(_CoreManager.default.getLiveQueryController().getDefaultLiveQueryClient());
1473
1810
 
1474
1811
  case 6:
1475
1812
  liveQueryClient = _context7.sent;
@@ -1522,8 +1859,6 @@ var ParseQuery = function () {
1522
1859
  }, {
1523
1860
  key: "cancel",
1524
1861
  value: function () {
1525
- var _this14 = this;
1526
-
1527
1862
  if (this._xhrRequest.task && typeof this._xhrRequest.task.abort === 'function') {
1528
1863
  this._xhrRequest.task._aborted = true;
1529
1864
 
@@ -1537,7 +1872,7 @@ var ParseQuery = function () {
1537
1872
  }
1538
1873
 
1539
1874
  return this._xhrRequest.onchange = function () {
1540
- return _this14.cancel();
1875
+ return this.cancel();
1541
1876
  };
1542
1877
  }
1543
1878
  }, {