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 3.0.10 to 3.1.0

26

actions/request.js

@@ -1,2 +0,3 @@

import querystring from 'querystring';
import querystring from 'query-string';
import equal from 'deep-equal';
import config from '../config';

@@ -19,3 +20,3 @@ import { getUrlInfo, getServiceVersion } from '../util/helpers';

while ((match = search.exec(query)))
while (match = search.exec(query))
urlParams[decode(match[1])] = decode(match[2]);

@@ -61,3 +62,3 @@ return urlParams;

}
if(['PUT' , 'PATCH', 'POST'].indexOf(method) !== -1){
if(['GET', 'DELETE'].indexOf(method) === -1){
requestOptions.body = JSON.stringify(data);

@@ -181,2 +182,17 @@ }

function findRequest(state, url, data, options) {
for (let id in state.request) {
const stateRequest = state.request[id];
const rUrl = querystring.parseUrl(stateRequest.url);
const parsedUrl = querystring.parseUrl(url);
const rQuery = { ...stateRequest.query, ...rUrl.query };
const query = options.query ? { ...options.query, ...parsedUrl.query } : parsedUrl.query;
if (equal(rUrl.url, parsedUrl.url)
&& equal(rQuery, query)
&& equal(stateRequest.data, data)) {
return stateRequest.id;
}
}
}
let nextId = 1;

@@ -198,2 +214,6 @@ export function makeRequest(method, url, data, options = {}) {

const state = getState();
const existingRequest = findRequest(state, url, data, options);
if (existingRequest) {
return existingRequest;
}
const requestOptions = getOptions(method, result.url, data, result.options, state.session);

@@ -200,0 +220,0 @@ const id = nextId;

5

package.json
{
"name": "wappsto-redux",
"version": "3.0.10",
"version": "3.1.0",
"description": "",

@@ -24,4 +24,5 @@ "main": "index.js",

"dependencies": {
"deep-equal": "^2.0.3",
"normalizr": "^3.4.1",
"querystring": "^0.2.0",
"query-string": "^6.13.1",
"redux": "^4.0.4",

@@ -28,0 +29,0 @@ "redux-thunk": "^2.3.0",

import config from '../config';
export const UUIDRegex = '[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-b8-9][a-f0-9]{3}-[a-f0-9]{12}';
const rex = new RegExp('^' + UUIDRegex + '$', 'i');
export function isUUID(data){
try {
if (data.match(/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-b8-9][a-f0-9]{3}-[a-f0-9]{12}$/i).length > 0) {
if (data.match(rex).length > 0) {
return true;

@@ -7,0 +10,0 @@ }

@@ -11,3 +11,3 @@ export function parse(json){

json.meta.id = json.path;
return [json]
return [json];
}

@@ -14,0 +14,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