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

redux-api-middleware

Package Overview
Dependencies
Maintainers
2
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 2.0.0-beta.4 to 2.0.0

2

lib/middleware.js

@@ -49,3 +49,3 @@ 'use strict';

return function () {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(action) {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(action) {
var validationErrors, _callAPI, _requestType, callAPI, endpoint, headers, _callAPI$options, options, method, body, credentials, bailout, types, _normalizeTypeDescrip, _normalizeTypeDescrip2, requestType, successType, failureType, res;

@@ -52,0 +52,0 @@

@@ -45,3 +45,3 @@ 'use strict';

var getJSON = function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(res) {
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(res) {
var contentType, emptyCodes;

@@ -107,3 +107,3 @@ return _regenerator2.default.wrap(function _callee$(_context) {

var actionWith = function () {
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(descriptor, args) {
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(descriptor, args) {
return _regenerator2.default.wrap(function _callee2$(_context2) {

@@ -110,0 +110,0 @@ while (1) {

{
"name": "redux-api-middleware",
"version": "2.0.0-beta.4",
"version": "2.0.0",
"description": "Redux middleware for calling an API.",

@@ -34,8 +34,8 @@ "main": "lib/index.js",

"devDependencies": {
"babel-cli": "^6.24.1",
"babel-eslint": "^7.2.3",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.0.2",
"babel-istanbul": "^0.12.2",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
"coveralls": "^2.11.12",
"coveralls": "^3.0.0",
"eslint": "^4.3.0",

@@ -45,8 +45,7 @@ "eslint-plugin-babel": "^4.1.2",

"isomorphic-fetch": "^2.1.1",
"nock": "^8.0.0",
"normalizr": "^2.2.1",
"nock": "^9.1.0",
"prettier": "^1.5.3",
"rimraf": "^2.5.4",
"rimraf": "^2.6.2",
"tap-spec": "^4.1.1 ",
"tape": "^4.6.0"
"tape": "^4.8.0"
},

@@ -53,0 +52,0 @@ "files": [

redux-api-middleware
====================
## This `next` branch is 2.0.0-beta in development!
See [Upgrading from v1.0.x](#upgrading-from-v1.0.x) for details on upgrading, and issues for the [2.0 milestone here](https://github.com/agraboso/redux-api-middleware/issues?utf8=%E2%9C%93&q=milestone%3A2.0.0%20)
[![npm version](https://badge.fury.io/js/redux-api-middleware.svg)](https://badge.fury.io/js/redux-api-middleware)
[![Build Status](https://travis-ci.org/agraboso/redux-api-middleware.svg?branch=next)](https://travis-ci.org/agraboso/redux-api-middleware) [![Coverage Status](https://coveralls.io/repos/agraboso/redux-api-middleware/badge.svg?branch=next&service=github)](https://coveralls.io/github/agraboso/redux-api-middleware?branch=next)
[Redux middleware](http://rackt.github.io/redux/docs/advanced/Middleware.html) for calling an API.
[Redux middleware](https://redux.js.org/docs/advanced/Middleware.html) for calling an API.

@@ -15,13 +11,14 @@ ## Table of contents

1. [Introduction](#introduction)
- [A simple example](#a-simple-example)
- [A simple example](#a-simple-example)
- [Breaking Changes in 2.0 Release](#breaking-changes-in-20-release)
2. [Installation](#installation)
3. [Usage](#usage)
- [Defining the API call](#defining-the-api-call)
- [Bailing out](#bailing-out)
- [Lifecycle](#lifecycle)
- [Customizing the dispatched FSAs](#customizing-the-dispatched-fsas)
- [Defining the API call](#defining-the-api-call)
- [Bailing out](#bailing-out)
- [Lifecycle](#lifecycle)
- [Customizing the dispatched FSAs](#customizing-the-dispatched-fsas)
4. [Reference](#reference)
- [Exports](#exports)
- [Flux Standard Actions](#flux-standard-actions)
- [Redux Standard API-calling Actions](#redux-standard-api-calling-actions)
- [Exports](#exports)
- [Flux Standard Actions](#flux-standard-actions)
- [Redux Standard API-calling Actions](#redux-standard-api-calling-actions)
5. [History](#history)

@@ -93,2 +90,6 @@ 6. [Tests](#tests)

### Breaking Changes in 2.0 Release
See the 2.0 Release Notes, and [Upgrading from v1.0.x](#upgrading-from-v1.0.x) for details on upgrading.
## Installation

@@ -200,3 +201,3 @@

In some cases, the data you would like to fetch from the server may already be cached in you Redux store. Or you may decide that the current user does not have the necessary permissions to make some request.
In some cases, the data you would like to fetch from the server may already be cached in your Redux store. Or you may decide that the current user does not have the necessary permissions to make some request.

@@ -400,3 +401,3 @@ You can tell `redux-api-middleware` to not make the API call through `[RSAA].bailout`. If the value is `true`, the RSAA will die here, and no FSA will be passed on to the next middleware.

return {
status: res.status
status: res.status,
statusText: res.statusText

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