
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Better, Type Safe Redux.
Emitter with a set of supported ActionsAction to its side effects)dispatch Actions on your emitterActions first trigger side-effects (via their respective reducers), then trigger any callbacks listening on that Actionnpm install tdux --save
import { Emitter } from 'tdux'
// Mock store
const store: { [id: number]: boolean } = {}
// Enumerate actions
type Actions = {
INCREMENT_COUNTER: number
OPEN_MODAL: boolean
}
// Define Tdux Emitter
class App extends Emitter<Actions> { }
// Create bus and register reducers (throws a compile time error unless both of these keys are defined, and return values of the right types)
const app = new App({
INCREMENT_COUNTER: ({ id, value }) => {
const previousValue = store[id]
store[id] = value
return previousValue
},
OPEN_MODAL: ({ id, value }) => {
const previousValue = store[id]
store[id] = value
return previousValue
}
})
// Trigger an action (throws a compile time error unless id and value are set, and are of the right types)
app.emit('OPEN_MODAL', { id: 123, value: true })
// Listen on an action (basic) (throws a compile time error if this event does not exist)
app.on('OPEN_MODAL')
.subscribe(_ => _.value)
// Listen on an action (advanced)
app.on('INCREMENT_COUNTER')
.filter(_ => _.id === 42)
.debounce()
.subscribe(_ => console.log(`Counter incremented from ${_.previousValue} to ${_.value}!`))
npm test
FAQs
Better, Type Safe Redux.
We found that tdux 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.