parse 6.1.1 → 6.2.0-alpha.1

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,5 +1,5 @@
1
1
  /**
2
- * Parse JavaScript SDK v6.1.1
2
+ * Parse JavaScript SDK v6.2.0-alpha.1
3
3
  *
4
4
  * The source tree of this library can be found at
5
5
  * https://github.com/ParsePlatform/Parse-SDK-JS
@@ -355,7 +355,7 @@ const config = {
355
355
  SERVER_AUTH_TOKEN: null,
356
356
  LIVEQUERY_SERVER_URL: null,
357
357
  ENCRYPTED_KEY: null,
358
- VERSION: 'js' + "6.1.1",
358
+ VERSION: 'js' + "6.2.0-alpha.1",
359
359
  APPLICATION_ID: null,
360
360
  JAVASCRIPT_KEY: null,
361
361
  MAINTENANCE_KEY: null,
@@ -5373,7 +5373,7 @@ class ParseFile {
5373
5373
  * an alphanumeric character, and consist of alphanumeric characters,
5374
5374
  * periods, spaces, underscores, or dashes.
5375
5375
  * @param data {Array} The data for the file, as either:
5376
- * 1. an Array of byte value Numbers, or
5376
+ * 1. an Array of byte value Numbers or Uint8Array.
5377
5377
  * 2. an Object like { base64: "..." } with a base64-encoded String.
5378
5378
  * 3. an Object like { uri: "..." } with a uri String.
5379
5379
  * 4. a File object selected with a file upload control. (3) only works
@@ -5411,7 +5411,7 @@ class ParseFile {
5411
5411
  this._metadata = metadata || {};
5412
5412
  this._tags = tags || {};
5413
5413
  if (data !== undefined) {
5414
- if ((0, _isArray.default)(data)) {
5414
+ if ((0, _isArray.default)(data) || data instanceof Uint8Array) {
5415
5415
  this._data = ParseFile.encodeBase64(data);
5416
5416
  this._source = {
5417
5417
  format: 'base64',
@@ -7531,7 +7531,7 @@ class ParseObject {
7531
7531
  */
7532
7532
  op(attr) {
7533
7533
  const pending = this._getPendingOps();
7534
- for (let i = pending.length; i--;) {
7534
+ for (let i = 0; i < pending.length; i += 1) {
7535
7535
  if (pending[i][attr]) {
7536
7536
  return pending[i][attr];
7537
7537
  }
@@ -15318,7 +15318,7 @@ function equals(a, b) {
15318
15318
  if (a.length !== b.length) {
15319
15319
  return false;
15320
15320
  }
15321
- for (let i = a.length; i--;) {
15321
+ for (let i = 0; i < a.length; i += 1) {
15322
15322
  if (!equals(a[i], b[i])) {
15323
15323
  return false;
15324
15324
  }