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

rxws

Package Overview
Dependencies
Maintainers
4
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rxws - npm Package Compare versions

Comparing version 5.3.7 to 5.3.8

17

lib/HTTPBackend.js

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

var list = resource.split('.');
var method = list.shift();
var method = list.shift().toUpperCase();
var path = list.reduce(toPath.bind(null, params), '');

@@ -109,8 +109,13 @@

return fetch('' + url + path + getQueryString(query), {
method: method.toUpperCase(),
headers: headers,
body: method === 'get' || method === 'head' ? null : JSON.stringify(body)
});
var requestOptions = {
method: method,
headers: headers
};
if (method !== 'GET' && method !== 'HEAD') {
requestOptions.body = JSON.stringify(body);
}
return fetch('' + url + path + getQueryString(query), requestOptions);
function toPath(params, path, res) {

@@ -117,0 +122,0 @@ if (params[res] === undefined || params[res] === null) {

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

expect(requestOptions.method).toBe('GET');
expect(requestOptions.body).toBe(null);
expect(requestOptions.body).toBe(undefined);

@@ -288,0 +288,0 @@ run();

{
"name": "rxws",
"version": "5.3.7",
"version": "5.3.8",
"description": "A RESTful reactive JavaScript implmentation on top of web sockets",

@@ -5,0 +5,0 @@ "main": "lib/rxws.js",

@@ -81,3 +81,3 @@ import { Observable } from 'rx';

let list = resource.split('.');
const method = list.shift();
const method = list.shift().toUpperCase();
const path = list.reduce(toPath.bind(null, params), '');

@@ -95,8 +95,13 @@

return fetch(`${url}${path}${getQueryString(query)}`, {
method: method.toUpperCase(),
let requestOptions = {
method,
headers,
body: (method === 'get' || method === 'head') ? null : JSON.stringify(body)
})
};
if (method !== 'GET' && method !== 'HEAD') {
requestOptions.body = JSON.stringify(body);
}
return fetch(`${url}${path}${getQueryString(query)}`, requestOptions)
function toPath(params, path, res) {

@@ -103,0 +108,0 @@ if (params[res] === undefined || params[res] === null) {

@@ -294,3 +294,3 @@ import backend from './HTTPBackend';

expect(requestOptions.method).toBe('GET');
expect(requestOptions.body).toBe(null);
expect(requestOptions.body).toBe(undefined);

@@ -297,0 +297,0 @@ run();

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