New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parseproxy

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parseproxy - npm Package Compare versions

Comparing version 1.0.0 to 1.0.2

test/parse.test.js

25

index.js

@@ -22,3 +22,3 @@ /**

var ParseProxy = function() {
this.init = false;
this.ready = false;
}

@@ -30,3 +30,3 @@

Parse.serverURL = serverURL;
this.init = true;
this.ready = true;
}

@@ -111,6 +111,20 @@

* @param {[type]} handler [description]
* @param {[array]} filters [description]
* @yield {[type]} [description]
*/
ParseProxy.prototype.subscribeMessageOutbound = function(handler) {
ParseProxy.prototype.subscribeMessageOutbound = function(handler, filters) {
let query = new Parse.Query('MessageOutbound');
if (filters) {
_.each(filters, function(val, index) {
console.log(index, val)
switch (val.ref) {
case 'equalTo':
query.equalTo(val.key, val.value);
break;
default:
debug('not Implemented.');
break;
}
});
}
let subscription = query.subscribe();

@@ -123,3 +137,2 @@ subscription.on('open', () => {

debug('onCreate', JSON.stringify(message));
let j = message.toJSON();
if (!handler.onCreate) throw new Error('handler.onCreate does not exist.');

@@ -135,6 +148,6 @@ // {

// }
if (ObjectHasKeys(j, ['fromUserId', 'type'])) {
if (ObjectHasKeys(message.toJSON(), ['toUserId', 'type'])) {
handler.onCreate(message);
} else {
debug('onCreate', 'discard message', j);
debug('onCreate', 'discard message', message);
}

@@ -141,0 +154,0 @@ });

{
"name": "parseproxy",
"version": "1.0.0",
"version": "1.0.2",
"description": "Parse Proxy for parse server",

@@ -27,3 +27,6 @@ "main": "index.js",

"q": "^1.4.1"
},
"devDependencies": {
"ava": "^0.16.0"
}
}

Sorry, the diff of this file is not supported yet

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