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

dequest

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dequest - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

8

lib/dequest.js

@@ -15,7 +15,5 @@ import _regeneratorRuntime from 'babel-runtime/regenerator';

import dedupe from 'promise-dedupe';
import timeout from '@trungdq88/promise-timeout';
export var configs = {
REDUCER_NAMESPACE: '@@dequest',
DEFAULT_TIMEOUT: 10000 // 10 secs
REDUCER_NAMESPACE: '@@dequest'
};

@@ -220,5 +218,3 @@

return transform(dedupe(action.requestId, timeout(resolveRequest(api, action), configs.DEFAULT_TIMEOUT, {
errorMessage: 'Connection timeout'
}))).then(function (r) {
return transform(dedupe(action.requestId, resolveRequest(api, action))).then(function (r) {
return store.dispatch({

@@ -225,0 +221,0 @@ type: '@@DEQUEST/RECEIVE',

@@ -175,3 +175,3 @@ import _regeneratorRuntime from 'babel-runtime/regenerator';

store.dispatch(makeRequest('test', get(fakeRequest, fakeParams)));
expect(mockGet).toHaveBeenCalledWith(fakeRequest, fakeParams);
expect(mockGet.mock.calls[0][0].request.args).toEqual([fakeRequest, fakeParams]);
});

@@ -188,3 +188,3 @@ });

store = createStoreWithMockApi({
get: function get(time) {
get: function get(action) {
return new Promise(function (resolve) {

@@ -196,5 +196,6 @@ return setTimeout(function () {

ok: true,
jsonBody: { data: time }
jsonBody: { data: action.request.args[0] }
}));
}, time);
}, action.request.args[0] // time,
);
});

@@ -201,0 +202,0 @@ }

{
"name": "dequest",
"version": "2.0.1",
"version": "2.0.2",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "author": "Trung Dinh Quang <trungdq88@gmail.com>",

import { createSelector } from 'reselect';
import dedupe from 'promise-dedupe';
import timeout from '@trungdq88/promise-timeout';
export const configs = {
REDUCER_NAMESPACE: '@@dequest',
DEFAULT_TIMEOUT: 10000, // 10 secs
};

@@ -136,10 +134,3 @@

return transform(
dedupe(
action.requestId,
timeout(resolveRequest(api, action), configs.DEFAULT_TIMEOUT, {
errorMessage: 'Connection timeout',
}),
),
)
return transform(dedupe(action.requestId, resolveRequest(api, action)))
.then(r =>

@@ -146,0 +137,0 @@ store.dispatch({

@@ -135,3 +135,6 @@ import dequest, {

store.dispatch(makeRequest('test', get(fakeRequest, fakeParams)));
expect(mockGet).toHaveBeenCalledWith(fakeRequest, fakeParams);
expect(mockGet.mock.calls[0][0].request.args).toEqual([
fakeRequest,
fakeParams,
]);
});

@@ -143,3 +146,3 @@ });

const store = createStoreWithMockApi({
get: time =>
get: action =>
new Promise(resolve =>

@@ -153,6 +156,6 @@ setTimeout(

ok: true,
jsonBody: { data: time },
jsonBody: { data: action.request.args[0] },
}),
),
time,
action.request.args[0], // time,
),

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