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

wappsto-redux

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wappsto-redux - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

39

actions/request.js

@@ -13,3 +13,35 @@ import querystring from 'querystring';

function getUrl(url, query = {}){
function getQueryObj(query) {
var urlParams = {};
var match,
pl = /\+/g,
search = /([^&=]+)=?([^&]*)/g,
decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); };
while ((match = search.exec(query)))
urlParams[decode(match[1])] = decode(match[2]);
return urlParams;
}
function splitUrlAndOptions(url, options){
let newOptions = { ...options };
let split = url.split("?");
if(split[1]){
let query = split.slice(1).join("?");
if(!newOptions.query){
newOptions.query = getQueryObj(query);
} else {
newOptions.query = {
...newOptions.query,
...getQueryObj(query)
}
}
}
return {
url: split[0],
options: newOptions
}
}
function getUrlWithQuery(url, query = {}){
let result = config.baseUrl + url;

@@ -31,3 +63,3 @@ if(Object.keys(query).length > 0){

}
requestOptions.url = getUrl(url, options.query);
requestOptions.url = getUrlWithQuery(url, options.query);
return requestOptions;

@@ -132,2 +164,5 @@ }

method = method.toUpperCase();
let result = splitUrlAndOptions(url, options);
url = result.url;
options = result.options;
let state = getState();

@@ -134,0 +169,0 @@ if(state.request[url] && state.request[url].status === 'pending'){

2

package.json
{
"name": "wappsto-redux",
"version": "1.1.4",
"version": "1.1.5",
"description": "",

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

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