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.
@workpop/analytics-middleware
Advanced tools
Analytics middleware for Redux.
$ npm install --save @workpop/analytics-middleware
Whenever we want to track analytics events we usually are required to supply our analytics library 2 things:
type AnalyticsEventType = {
name: string,
metadata: Object
}
A sample action creator:
function addSparksAction(sparkCount, uiSource) {
return {
type: "ADD_SPARKS",
data: sparkCount,
analytics: {
name: "Track Sparks",
metadata: {
sparkCount,
"UI Source": uiSource
}
}
}
}
To enable the Redux Store to start dispatching analytics tracking, we need to setup our middleware.
import { createStore, applyMiddleware } from 'redux';
import rootReducer from './rootReducer';
import { analyticsMiddleware } from '@workpop/analytics-middleware';
import { event } from '@workpop/analytics-core';
export const store = createStore(rootReducer, {}, applyMiddleware(analyticsMiddleware(event));
The analytics middleware takes one argument, which is your event tracking implementation:
analyticsMiddleware(track)
track
- Function - analytics implementation from whatever library.The middleware will call this track
function with 2 params, name
, and metadata
.
FAQs
Redux middleware for Workpop Analytics
We found that @workpop/analytics-middleware 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.