Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

parse

Package Overview
Dependencies
Maintainers
5
Versions
193
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse - npm Package Compare versions

Comparing version 1.6.5 to 1.6.6

2

lib/browser/CoreManager.js

@@ -19,3 +19,3 @@ /**

SERVER_URL: 'https://api.parse.com',
VERSION: '1.6.5',
VERSION: '1.6.6',
APPLICATION_ID: null,

@@ -22,0 +22,0 @@ JAVASCRIPT_KEY: null,

@@ -46,70 +46,60 @@ /**

function encode(_x, _x2, _x3, _x4) {
var _again = true;
_function: while (_again) {
var value = _x,
disallowObjects = _x2,
forcePointers = _x3,
seen = _x4;
json = output = k = undefined;
_again = false;
if (value instanceof _ParseObject2['default']) {
if (disallowObjects) {
throw new Error('Parse Objects not allowed here');
}
if (forcePointers || !seen || seen.indexOf(value) > -1 || value.dirty() || _Object$keys(value._getServerData()).length < 1) {
return value.toPointer();
}
seen = seen.concat(value);
var json = value._toFullJSON(seen);
_x = json;
_x2 = disallowObjects;
_x3 = forcePointers;
_x4 = seen;
_again = true;
continue _function;
function encode(value, disallowObjects, forcePointers, seen) {
if (value instanceof _ParseObject2['default']) {
if (disallowObjects) {
throw new Error('Parse Objects not allowed here');
}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2['default'] || value instanceof _ParseGeoPoint2['default'] || value instanceof _ParseRelation2['default']) {
return value.toJSON();
var seenEntry = value.id ? value.className + ':' + value.id : value;
if (forcePointers || !seen || seen.indexOf(seenEntry) > -1 || value.dirty() || _Object$keys(value._getServerData()).length < 1) {
return value.toPointer();
}
if (value instanceof _ParseFile2['default']) {
if (!value.url()) {
throw new Error('Tried to encode an unsaved file.');
}
return value.toJSON();
seen = seen.concat(seenEntry);
var json = encode(value.attributes, disallowObjects, forcePointers, seen);
json.className = value.className;
json.__type = 'Object';
if (value.id) {
json.objectId = value.id;
}
if (toString.call(value) === '[object Date]') {
if (isNaN(value)) {
throw new Error('Tried to encode an invalid date.');
}
return { __type: 'Date', iso: value.toJSON() };
return json;
}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2['default'] || value instanceof _ParseGeoPoint2['default'] || value instanceof _ParseRelation2['default']) {
return value.toJSON();
}
if (value instanceof _ParseFile2['default']) {
if (!value.url()) {
throw new Error('Tried to encode an unsaved file.');
}
if (toString.call(value) === '[object RegExp]' && typeof value.source === 'string') {
return value.source;
return value.toJSON();
}
if (toString.call(value) === '[object Date]') {
if (isNaN(value)) {
throw new Error('Tried to encode an invalid date.');
}
return { __type: 'Date', iso: value.toJSON() };
}
if (toString.call(value) === '[object RegExp]' && typeof value.source === 'string') {
return value.source;
}
if (Array.isArray(value)) {
return value.map(function (v) {
return encode(v, disallowObjects, forcePointers, seen);
});
}
if (Array.isArray(value)) {
return value.map(function (v) {
return encode(v, disallowObjects, forcePointers, seen);
});
}
if (value && typeof value === 'object') {
var output = {};
for (var k in value) {
output[k] = encode(value[k], disallowObjects, forcePointers, seen);
}
return output;
if (value && typeof value === 'object') {
var output = {};
for (var k in value) {
output[k] = encode(value[k], disallowObjects, forcePointers, seen);
}
return output;
}
return value;
}
return value;
}
exports['default'] = function (value, disallowObjects, forcePointers) {
return encode(value, !!disallowObjects, !!forcePointers, []);
exports['default'] = function (value, disallowObjects, forcePointers, seen) {
return encode(value, !!disallowObjects, !!forcePointers, seen || []);
};
module.exports = exports['default'];

@@ -400,2 +400,3 @@ /**

value: function toJSON() {
var seenEntry = this.id ? this.className + ':' + this.id : this;
var json = {};

@@ -407,3 +408,3 @@ var attrs = this.attributes;

} else {
json[attr] = (0, _encode2['default'])(attrs[attr], false, true);
json[attr] = (0, _encode2['default'])(attrs[attr], false, false, [seenEntry]);
}

@@ -410,0 +411,0 @@ }

@@ -19,3 +19,3 @@ /**

SERVER_URL: 'https://api.parse.com',
VERSION: '1.6.5',
VERSION: '1.6.6',
APPLICATION_ID: null,

@@ -22,0 +22,0 @@ JAVASCRIPT_KEY: null,

@@ -46,70 +46,60 @@ /**

function encode(_x, _x2, _x3, _x4) {
var _again = true;
_function: while (_again) {
var value = _x,
disallowObjects = _x2,
forcePointers = _x3,
seen = _x4;
json = output = k = undefined;
_again = false;
if (value instanceof _ParseObject2['default']) {
if (disallowObjects) {
throw new Error('Parse Objects not allowed here');
}
if (forcePointers || !seen || seen.indexOf(value) > -1 || value.dirty() || _Object$keys(value._getServerData()).length < 1) {
return value.toPointer();
}
seen = seen.concat(value);
var json = value._toFullJSON(seen);
_x = json;
_x2 = disallowObjects;
_x3 = forcePointers;
_x4 = seen;
_again = true;
continue _function;
function encode(value, disallowObjects, forcePointers, seen) {
if (value instanceof _ParseObject2['default']) {
if (disallowObjects) {
throw new Error('Parse Objects not allowed here');
}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2['default'] || value instanceof _ParseGeoPoint2['default'] || value instanceof _ParseRelation2['default']) {
return value.toJSON();
var seenEntry = value.id ? value.className + ':' + value.id : value;
if (forcePointers || !seen || seen.indexOf(seenEntry) > -1 || value.dirty() || _Object$keys(value._getServerData()).length < 1) {
return value.toPointer();
}
if (value instanceof _ParseFile2['default']) {
if (!value.url()) {
throw new Error('Tried to encode an unsaved file.');
}
return value.toJSON();
seen = seen.concat(seenEntry);
var json = encode(value.attributes, disallowObjects, forcePointers, seen);
json.className = value.className;
json.__type = 'Object';
if (value.id) {
json.objectId = value.id;
}
if (toString.call(value) === '[object Date]') {
if (isNaN(value)) {
throw new Error('Tried to encode an invalid date.');
}
return { __type: 'Date', iso: value.toJSON() };
return json;
}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2['default'] || value instanceof _ParseGeoPoint2['default'] || value instanceof _ParseRelation2['default']) {
return value.toJSON();
}
if (value instanceof _ParseFile2['default']) {
if (!value.url()) {
throw new Error('Tried to encode an unsaved file.');
}
if (toString.call(value) === '[object RegExp]' && typeof value.source === 'string') {
return value.source;
return value.toJSON();
}
if (toString.call(value) === '[object Date]') {
if (isNaN(value)) {
throw new Error('Tried to encode an invalid date.');
}
return { __type: 'Date', iso: value.toJSON() };
}
if (toString.call(value) === '[object RegExp]' && typeof value.source === 'string') {
return value.source;
}
if (Array.isArray(value)) {
return value.map(function (v) {
return encode(v, disallowObjects, forcePointers, seen);
});
}
if (Array.isArray(value)) {
return value.map(function (v) {
return encode(v, disallowObjects, forcePointers, seen);
});
}
if (value && typeof value === 'object') {
var output = {};
for (var k in value) {
output[k] = encode(value[k], disallowObjects, forcePointers, seen);
}
return output;
if (value && typeof value === 'object') {
var output = {};
for (var k in value) {
output[k] = encode(value[k], disallowObjects, forcePointers, seen);
}
return output;
}
return value;
}
return value;
}
exports['default'] = function (value, disallowObjects, forcePointers) {
return encode(value, !!disallowObjects, !!forcePointers, []);
exports['default'] = function (value, disallowObjects, forcePointers, seen) {
return encode(value, !!disallowObjects, !!forcePointers, seen || []);
};
module.exports = exports['default'];

@@ -400,2 +400,3 @@ /**

value: function toJSON() {
var seenEntry = this.id ? this.className + ':' + this.id : this;
var json = {};

@@ -407,3 +408,3 @@ var attrs = this.attributes;

} else {
json[attr] = (0, _encode2['default'])(attrs[attr], false, true);
json[attr] = (0, _encode2['default'])(attrs[attr], false, false, [seenEntry]);
}

@@ -410,0 +411,0 @@ }

@@ -19,3 +19,3 @@ /**

SERVER_URL: 'https://api.parse.com',
VERSION: '1.6.5',
VERSION: '1.6.6',
APPLICATION_ID: null,

@@ -22,0 +22,0 @@ JAVASCRIPT_KEY: null,

@@ -46,70 +46,60 @@ /**

function encode(_x, _x2, _x3, _x4) {
var _again = true;
_function: while (_again) {
var value = _x,
disallowObjects = _x2,
forcePointers = _x3,
seen = _x4;
json = output = k = undefined;
_again = false;
if (value instanceof _ParseObject2['default']) {
if (disallowObjects) {
throw new Error('Parse Objects not allowed here');
}
if (forcePointers || !seen || seen.indexOf(value) > -1 || value.dirty() || _Object$keys(value._getServerData()).length < 1) {
return value.toPointer();
}
seen = seen.concat(value);
var json = value._toFullJSON(seen);
_x = json;
_x2 = disallowObjects;
_x3 = forcePointers;
_x4 = seen;
_again = true;
continue _function;
function encode(value, disallowObjects, forcePointers, seen) {
if (value instanceof _ParseObject2['default']) {
if (disallowObjects) {
throw new Error('Parse Objects not allowed here');
}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2['default'] || value instanceof _ParseGeoPoint2['default'] || value instanceof _ParseRelation2['default']) {
return value.toJSON();
var seenEntry = value.id ? value.className + ':' + value.id : value;
if (forcePointers || !seen || seen.indexOf(seenEntry) > -1 || value.dirty() || _Object$keys(value._getServerData()).length < 1) {
return value.toPointer();
}
if (value instanceof _ParseFile2['default']) {
if (!value.url()) {
throw new Error('Tried to encode an unsaved file.');
}
return value.toJSON();
seen = seen.concat(seenEntry);
var json = encode(value.attributes, disallowObjects, forcePointers, seen);
json.className = value.className;
json.__type = 'Object';
if (value.id) {
json.objectId = value.id;
}
if (toString.call(value) === '[object Date]') {
if (isNaN(value)) {
throw new Error('Tried to encode an invalid date.');
}
return { __type: 'Date', iso: value.toJSON() };
return json;
}
if (value instanceof _ParseOp.Op || value instanceof _ParseACL2['default'] || value instanceof _ParseGeoPoint2['default'] || value instanceof _ParseRelation2['default']) {
return value.toJSON();
}
if (value instanceof _ParseFile2['default']) {
if (!value.url()) {
throw new Error('Tried to encode an unsaved file.');
}
if (toString.call(value) === '[object RegExp]' && typeof value.source === 'string') {
return value.source;
return value.toJSON();
}
if (toString.call(value) === '[object Date]') {
if (isNaN(value)) {
throw new Error('Tried to encode an invalid date.');
}
return { __type: 'Date', iso: value.toJSON() };
}
if (toString.call(value) === '[object RegExp]' && typeof value.source === 'string') {
return value.source;
}
if (Array.isArray(value)) {
return value.map(function (v) {
return encode(v, disallowObjects, forcePointers, seen);
});
}
if (Array.isArray(value)) {
return value.map(function (v) {
return encode(v, disallowObjects, forcePointers, seen);
});
}
if (value && typeof value === 'object') {
var output = {};
for (var k in value) {
output[k] = encode(value[k], disallowObjects, forcePointers, seen);
}
return output;
if (value && typeof value === 'object') {
var output = {};
for (var k in value) {
output[k] = encode(value[k], disallowObjects, forcePointers, seen);
}
return output;
}
return value;
}
return value;
}
exports['default'] = function (value, disallowObjects, forcePointers) {
return encode(value, !!disallowObjects, !!forcePointers, []);
exports['default'] = function (value, disallowObjects, forcePointers, seen) {
return encode(value, !!disallowObjects, !!forcePointers, seen || []);
};
module.exports = exports['default'];

@@ -400,2 +400,3 @@ /**

value: function toJSON() {
var seenEntry = this.id ? this.className + ':' + this.id : this;
var json = {};

@@ -407,3 +408,3 @@ var attrs = this.attributes;

} else {
json[attr] = (0, _encode2['default'])(attrs[attr], false, true);
json[attr] = (0, _encode2['default'])(attrs[attr], false, false, [seenEntry]);
}

@@ -410,0 +411,0 @@ }

{
"name": "parse",
"version": "1.6.5",
"version": "1.6.6",
"description": "The Parse JavaScript SDK",

@@ -5,0 +5,0 @@ "homepage": "https://www.parse.com",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc