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

redux-saga-resources

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-saga-resources - npm Package Compare versions

Comparing version 0.1.16 to 0.1.17

13

es6/middlewares/json.js

@@ -184,2 +184,13 @@ var __assign = (this && this.__assign) || Object.assign || function(t) {

}
function headersToObject(headers) {
if (headers.get && headers.keys) {
const keys = headers.keys();
const res = {};
for (const key of keys) {
res[key] = headers.get(key);
}
return res;
}
return headers;
}
export function* fetchMiddleware({ request, response, withResponse }, next) {

@@ -199,3 +210,3 @@ const paramKeys = Object.keys(request.params);

response.url = result.url;
response.headers = result.headers;
response.headers = headersToObject(result.headers);
try {

@@ -202,0 +213,0 @@ response.body = yield call(() => result.json());

@@ -211,2 +211,35 @@ 'use strict';

}
function headersToObject(headers) {
if (headers.get && headers.keys) {
let keys = headers.keys();
let res = {};
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
let key = _step.value;
res[key] = headers.get(key);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return res;
}
return headers;
}
function* fetchMiddleware(_ref3, next) {

@@ -230,3 +263,3 @@ let request = _ref3.request,

response.url = result.url;
response.headers = result.headers;
response.headers = headersToObject(result.headers);
try {

@@ -233,0 +266,0 @@ response.body = yield (0, _effects.call)(() => result.json());

2

package.json
{
"name": "redux-saga-resources",
"version": "0.1.16",
"version": "0.1.17",
"description": "",

@@ -5,0 +5,0 @@ "typings": "es6/index.d.ts",

@@ -204,2 +204,13 @@ /* tslint:disable */

}
function headersToObject(headers: any) {
if (headers.get && headers.keys) {
const keys = headers.keys();
const res: any = {};
for (const key of keys) {
res[key] = headers.get(key);
}
return res;
}
return headers;
}
export function* fetchMiddleware({ request, response, withResponse }: any, next: any) {

@@ -221,3 +232,3 @@ const paramKeys = Object.keys(request.params);

response.url = result.url;
response.headers = result.headers;
response.headers = headersToObject(result.headers);
try {

@@ -224,0 +235,0 @@ response.body = yield call(() => result.json());

Sorry, the diff of this file is not supported yet

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