Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
redux-action-logging
Advanced tools
Redux testing utility middleware to log actions received by a store without mocking that store.
Redux testing utility middlware to log actions received by a store without mocking that store.
npm install redux-action-logging
Add redux-action-logging to your middleware chain. You likely only want to do this in your test suite and not in production
import { createStore, applyMiddleware } from "redux"
import reducer from "./reducer"
import {
storeActionsMiddleware,
storeActions
} from "redux-action-logging"
const middlewares = [storeActionsMiddleware]
store = applyMiddleware(...middlewares)(createStore)(reducer)
// Given these actions sent to your store:
store.dispatch({ type: FOO })
store.dispatch({ type: BAR })
store.dispatch({ type: BAZ, value: 10 })
store.dispatch((dispatch, getState) => dispatch({type: QUX }))
// These return true:
storeActions.has(FOO)
storeActions.has(FOO, BAR)
storeActions.has(BAZ, BAR)
storeActions.has({ type: BAZ, value: 10 })
storeActions.has(QUX)
storeActions.has(
BAR,
{ type: BAZ, value: 10}
)
// These return false:
storeActions.has(XYZZY)
storeActions.has(FOO, XYZZY)
storeActions.has({ type: BAZ, value: 5 })
storeActions.has(
BAR,
{ type: BAZ, value: 5}
)
storeActions.actions() // returns array of all actions received by your store
storeActions.clear() // clears array
MIT
FAQs
Redux testing utility middleware to log actions received by a store without mocking that store.
The npm package redux-action-logging receives a total of 267 weekly downloads. As such, redux-action-logging popularity was classified as not popular.
We found that redux-action-logging demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.