Socket
Socket
Sign inDemoInstall

redux

Package Overview
Dependencies
0
Maintainers
6
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0-rc.0 to 5.0.0-rc.1

src/utils/isAction.ts

10

dist/redux.d.ts

@@ -567,3 +567,11 @@ /**

declare function isAction(action: unknown): action is Action<string>;
/**
* @param obj The object to inspect.
* @returns True if the argument appears to be a plain object.
*/
declare function isPlainObject(obj: any): obj is object;
/**
* These are private action types reserved by Redux.

@@ -580,2 +588,2 @@ * For any unknown actions, you must return the current state.

export { Action, ActionCreator, ActionCreatorsMapObject, ActionFromReducer, ActionFromReducersMapObject, AnyAction, Dispatch, Middleware, MiddlewareAPI, Observable, Observer, PreloadedStateShapeFromReducersMapObject, Reducer, ReducerFromReducersMapObject, ReducersMapObject, StateFromReducersMapObject, Store, StoreCreator, StoreEnhancer, StoreEnhancerStoreCreator, UnknownAction, Unsubscribe, ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore, legacy_createStore };
export { Action, ActionCreator, ActionCreatorsMapObject, ActionFromReducer, ActionFromReducersMapObject, AnyAction, Dispatch, Middleware, MiddlewareAPI, Observable, Observer, PreloadedStateShapeFromReducersMapObject, Reducer, ReducerFromReducersMapObject, ReducersMapObject, StateFromReducersMapObject, Store, StoreCreator, StoreEnhancer, StoreEnhancerStoreCreator, UnknownAction, Unsubscribe, ActionTypes as __DO_NOT_USE__ActionTypes, applyMiddleware, bindActionCreators, combineReducers, compose, createStore, isAction, isPlainObject, legacy_createStore };

@@ -381,2 +381,7 @@ // src/utils/formatProdErrorMessage.ts

}
// src/utils/isAction.ts
function isAction(action) {
return isPlainObject(action) && "type" in action && typeof action.type === "string";
}
export {

@@ -389,4 +394,6 @@ actionTypes_default as __DO_NOT_USE__ActionTypes,

createStore,
isAction,
isPlainObject,
legacy_createStore
};
//# sourceMappingURL=redux.mjs.map

17

package.json
{
"name": "redux",
"version": "5.0.0-rc.0",
"version": "5.0.0-rc.1",
"description": "Predictable state container for JavaScript apps",

@@ -62,4 +62,4 @@ "license": "MIT",

"@types/node": "^18.7.16",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "^5.36.2",
"@typescript-eslint/eslint-plugin": "^6",
"@typescript-eslint/parser": "^6",
"cross-env": "^7.0.3",

@@ -78,7 +78,12 @@ "esbuild-extra": "^0.1.3",

"rxjs": "^7.5.6",
"tsup": "^6.7.0",
"typescript": "^4.8.3",
"vitest": "^0.27.2"
"tsup": "7.0.0",
"typescript": "5.2",
"vitest": "^0.34.0"
},
"resolutions": {
"esbuild": "0.19.7",
"@typescript-eslint/eslint-plugin": "6.12.0",
"@typescript-eslint/parser": "6.12.0"
},
"sideEffects": false
}

@@ -7,2 +7,4 @@ // functions

import compose from './compose'
import isAction from './utils/isAction'
import isPlainObject from './utils/isPlainObject'
import __DO_NOT_USE__ActionTypes from './utils/actionTypes'

@@ -46,3 +48,5 @@

compose,
isAction,
isPlainObject,
__DO_NOT_USE__ActionTypes
}

@@ -5,3 +5,3 @@ /**

*/
export default function isPlainObject(obj: any): boolean {
export default function isPlainObject(obj: any): obj is object {
if (typeof obj !== 'object' || obj === null) return false

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc