
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@koax/store
Advanced tools
Redux style store.
$ npm install @koax/store
import koax from 'koax'
import createStore from '@koax/store'
import combineReducers from '@f/combine-reducers'
import getProp from '@f/get-prop'
import {fetchEffect, fetchType} from '@koax/fetch'
import {get} from '@koax/fetch-json'
const REQUEST_POSTS = 'REQUEST_POSTS'
const RECEIVE_POSTS = 'RECEIVE_POSTS'
const RETRIEVE_STATE = 'RETRIEVE_STATE'
let app = koax()
app.use(fetchEffect)
app.use(retrieveState)
let store = createStore(combineReducers({postsBySubredit}), {}, app)
app(getPosts('frontend')).then(res => res) // => frontend posts
function * getPosts (subredit) {
let items = yield {type: RETRIEVE_STATE, path: `postsBySubredit.${subredit}.items`}
if (!items) {
yield {type: REQUEST_POSTS, subredit}
items = yield get(`api.redit.com/posts/${subredit}`)
yield {
type: RECEIVE_POSTS,
payload: items
subredit
}
}
return items
}
function retrieveState (action, next getState) {
if (action.type === RETRIEVE_STATE) {
return getProp(action.path, getState())
}
return next()
}
function postsBySubredit (state, action) {
switch (action.type) {
case REQUEST_POSTS:
return {
...state,
[action.subredit]: {
isFetching: true
}
}
case RECEIVE_POSTS:
return {
...state,
[action.subredit]: {
isFetching: false,
items: action.payload
}
}
}
}
reducer - redux style reducerinitialState - initial state objectapp - koax app to bind state and mount store dispatcherReturns: store (redux store api excluding dispatch - koax app should be used to dispatch)
Returns: current state of store
listener - listener called when updates to state occur - recieves new statereducer - new reducer toMIT
FAQs
Redux style store.
We found that @koax/store 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.