
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@fleur/fleur
Advanced tools
An Fully-typed Flux framework inspired by Fluxible. Runs on Node / Web.
(No dependence to React. see this if you want to use with React.)
// actions.ts (Action typings)
import { actions, action } from '@fleur/fleur'
export const CounterActions = actions('Counter', {
increase: action<{ amount: number }>(),
decrease: action<{ amount: number }>(),
}
// store.ts (Store)
import { reducerStore } from '@fleur/fleur'
import { CounterActions } from './actions.ts'
interface State {
count: number
}
export const CounterStore = reducerStore<State>('CounterStore', () => ({
count: 0
}))
.listen(CounterActions.increase, (draft, payload) => {
// immutable changing state with `immer.js`
draft.count += payload.amount
})
.listen(CounterActions.decrease, (draft, payload) => {
draft.count -= payload.amount
})
}
// operations.ts (Action Creator)
import { operations } from '@fleur/fleur'
import { CounterActions } from './actions.ts'
export const CounterOps = operations({
increase(ctx, amount: number) {
ctx.dispatch(CounterActions.increase, { amount })
},
decrease(ctx, amount: number) {
ctx.dispatch(CounterActions.decrease, { amount })
},
})
// selectors.ts
import { selector } from '@fleur/fleur'
import { CounterStore } from './store.ts'
export const selectCount = selector(getState => getState(CounterStore).count)
// app.ts
import Fleur, { withReduxDevTools } from '@fleur/fleur'
import { CounterStore } from './store.ts'
import { CounterOps } from './operations.ts'
import { selectCount } from './selectors.ts'
const app = new Fleur({
stores: [CounterStore],
})
;(async () => {
const ctx = app.createContext()
// Enable redux-devtools if you want
withReduxDevTools(ctx)
await ctx.executeOperation(CounterOps.increase, 10)
console.log(selectCount(ctx.getStore)) // => 10
await ctx.executeOperation(CounterOps.decrease, 20)
console.log(selectCount(ctx.getStore)) // => -10
})()
See @fleur/react
.
FAQs
An Fully-typed Flux framework inspired by Fluxible. Runs on Node / Web.
The npm package @fleur/fleur receives a total of 14 weekly downloads. As such, @fleur/fleur popularity was classified as not popular.
We found that @fleur/fleur demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.