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

jsonrpcserver

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonrpcserver - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "jsonrpcserver",
"version": "1.0.1",
"version": "1.0.2",
"description": "JSON-RPC Server (http://www.jsonrpc.org/specification) with endpoints implementation",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -158,3 +158,3 @@ 'use strict';

//Result
else {
else if(! (!idField && (typeof idField == 'object'))) { //idField != null
response = {

@@ -167,2 +167,5 @@ jsonrpc: "2.0",

//Notification
else httpCode = 204;
//Send response

@@ -169,0 +172,0 @@ this.getResponse().writeHead(httpCode, headers);

@@ -17,5 +17,4 @@ /**

"E_NOTIFICATION": {httpCode: 204, response: null, name: "E_NOTIFICATION"},
"E_DISALLOWED_REQUEST_METHOD": {httpCode: 405, response: null, name: "E_DISALLOWED_REQUEST_METHOD"},
"E_TIMEOUT": {httpCode: 504, response: null, name: "E_TIMEOUT"}
};

@@ -192,6 +192,6 @@ 'use strict';

//if notification
if(request.content && !request.content.hasOwnProperty('id')) isNotification = RpcErrors.E_NOTIFICATION;
if(request.content && !request.content.hasOwnProperty('id')) isNotification = true;
if(!error) this.callMethod(uuid, request.url.path, request.content.method, request.content.params);
if(error || isNotification) this.processResponse(uuid, error || isNotification);
if(error || isNotification) this.processResponse(uuid, error);
};

@@ -198,0 +198,0 @@

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