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

redux-api-middleware

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-api-middleware - npm Package Compare versions

Comparing version 1.0.0-beta1 to 1.0.0-beta2

4

lib/CALL_API.js

@@ -10,6 +10,8 @@ /**

var _Symbol = require('babel-runtime/core-js/symbol')['default'];
exports.__esModule = true;
var CALL_API = Symbol('Call API');
var CALL_API = _Symbol('Call API');
exports['default'] = CALL_API;
module.exports = exports['default'];

@@ -10,7 +10,7 @@ /**

exports.__esModule = true;
var _inherits = require('babel-runtime/helpers/inherits')['default'];
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default'];
function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
exports.__esModule = true;

@@ -17,0 +17,0 @@ var InvalidRSAA = (function (_Error) {

@@ -33,6 +33,6 @@ /**

var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _CALL_API = require('./CALL_API');

@@ -39,0 +39,0 @@

'use strict';
exports.__esModule = true;
var _extends = require('babel-runtime/helpers/extends')['default'];
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _regeneratorRuntime = require('babel-runtime/regenerator')['default'];
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
exports.__esModule = true;
var _isomorphicFetch = require('isomorphic-fetch');

@@ -42,3 +44,3 @@

return regeneratorRuntime.async(function callee$2$0$(context$3$0) {
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) {
while (1) switch (context$3$0.prev = context$3$0.next) {

@@ -107,3 +109,3 @@ case 0:

context$3$0.next = 28;
return regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
return _regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
payload: new _errors.RequestError('[CALL_API].bailout function failed'),

@@ -133,3 +135,3 @@ error: true

context$3$0.next = 39;
return regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
return _regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
payload: new _errors.RequestError('[CALL_API].endpoint function failed'),

@@ -159,3 +161,3 @@ error: true

context$3$0.next = 50;
return regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
return _regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
payload: new _errors.RequestError('[CALL_API].headers function failed'),

@@ -172,3 +174,3 @@ error: true

context$3$0.next = 55;
return regeneratorRuntime.awrap(_isomorphicFetch2['default'](endpoint, { method: method, body: body, credentials: credentials, headers: headers }));
return _regeneratorRuntime.awrap(_isomorphicFetch2['default'](endpoint, { method: method, body: body, credentials: credentials, headers: headers }));

@@ -178,3 +180,3 @@ case 55:

context$3$0.next = 58;
return regeneratorRuntime.awrap(_util.actionWith(requestType, [action, getState()]));
return _regeneratorRuntime.awrap(_util.actionWith(requestType, [action, getState()]));

@@ -191,3 +193,3 @@ case 58:

context$3$0.next = 66;
return regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
return _regeneratorRuntime.awrap(_util.actionWith(_extends({}, requestType, {
payload: new _errors.RequestError(context$3$0.t7.message),

@@ -208,3 +210,3 @@ error: true

context$3$0.next = 71;
return regeneratorRuntime.awrap(_util.actionWith(successType, [action, getState(), res]));
return _regeneratorRuntime.awrap(_util.actionWith(successType, [action, getState(), res]));

@@ -217,3 +219,3 @@ case 71:

context$3$0.next = 77;
return regeneratorRuntime.awrap(_util.actionWith(_extends({}, failureType, {
return _regeneratorRuntime.awrap(_util.actionWith(_extends({}, failureType, {
error: true

@@ -220,0 +222,0 @@ }), [action, getState(), res]));

'use strict';
var _extends = require('babel-runtime/helpers/extends')['default'];
var _regeneratorRuntime = require('babel-runtime/regenerator')['default'];
var _Promise = require('babel-runtime/core-js/promise')['default'];
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _errors = require('./errors');

@@ -19,3 +23,3 @@

var contentType;
return regeneratorRuntime.async(function getJSON$(context$1$0) {
return _regeneratorRuntime.async(function getJSON$(context$1$0) {
while (1) switch (context$1$0.prev = context$1$0.next) {

@@ -31,3 +35,3 @@ case 0:

context$1$0.next = 4;
return regeneratorRuntime.awrap(res.json());
return _regeneratorRuntime.awrap(res.json());

@@ -39,3 +43,3 @@ case 4:

context$1$0.next = 9;
return regeneratorRuntime.awrap(Promise.resolve());
return _regeneratorRuntime.awrap(_Promise.resolve());

@@ -103,3 +107,3 @@ case 9:

function actionWith(descriptor, args) {
return regeneratorRuntime.async(function actionWith$(context$1$0) {
return _regeneratorRuntime.async(function actionWith$(context$1$0) {
while (1) switch (context$1$0.prev = context$1$0.next) {

@@ -110,3 +114,3 @@ case 0:

context$1$0.next = 4;
return regeneratorRuntime.awrap(typeof descriptor.payload === 'function' ? descriptor.payload.apply(descriptor, args) : descriptor.payload);
return _regeneratorRuntime.awrap(typeof descriptor.payload === 'function' ? descriptor.payload.apply(descriptor, args) : descriptor.payload);

@@ -116,3 +120,3 @@ case 4:

context$1$0.next = 7;
return regeneratorRuntime.awrap(typeof descriptor.meta === 'function' ? descriptor.meta.apply(descriptor, args) : descriptor.meta);
return _regeneratorRuntime.awrap(typeof descriptor.meta === 'function' ? descriptor.meta.apply(descriptor, args) : descriptor.meta);

@@ -119,0 +123,0 @@ case 7:

'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
exports.__esModule = true;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _CALL_API = require('./CALL_API');

@@ -8,0 +8,0 @@

{
"name": "redux-api-middleware",
"version": "1.0.0-beta1",
"version": "1.0.0-beta2",
"description": "Redux middleware for calling an API.",

@@ -29,2 +29,3 @@ "main": "lib/index.js",

"dependencies": {
"babel-runtime": "^5.8.25",
"isomorphic-fetch": "^2.1.1",

@@ -31,0 +32,0 @@ "lodash.isplainobject": "^3.2.0"

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