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

redux-thunks

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-thunks - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

14

cjs/create_thunk.js

@@ -8,8 +8,18 @@ "use strict";

function createThunk(type, fn) {
const actionCreator = (...args) => (dispatch, getState) => fn({ dispatch, getState, type }, ...args);
var actionCreator = function actionCreator() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return function (dispatch, getState) {
return fn.apply(undefined, [{ dispatch: dispatch, getState: getState, type: type }].concat(args));
};
};
// mimic redux-actions' .toString() functionality
actionCreator.toString = () => type.toString();
actionCreator.toString = function () {
return type.toString();
};
return actionCreator;
}

8

package.json
{
"name": "redux-thunks",
"version": "0.3.0",
"version": "0.3.1",
"description": "Thunk creator for redux",

@@ -33,3 +33,7 @@ "main": "cjs/index.js",

"targets": {
"node": 6
"node": 6,
"browsers": [
"last 2 versions",
"ie >= 11"
]
}

@@ -36,0 +40,0 @@ }

@@ -74,3 +74,3 @@ # redux-thunks

#### `createThunk('type', ({ dispatch, getStore, type }, [...args]))`
#### `createThunk('type', ({ dispatch, getState, type }, [...args]))`

@@ -77,0 +77,0 @@ The syntax is very similar to that of `createAction`, and it smooths over the differences by similarly exposing a `toString` method on the thunk creator.

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