Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
redogs
Advanced tools
Readme
Redux-like store with RxJS Observable output and effects
npm i redogs
import { createStandardAction, createStore, getType, isActionOf } from 'redogs';
import { filter, map, tap, withLatestFrom } from 'rxjs/operators';
// create reusable action creators
const incrementAction = createStandardAction('INCREMENT')<void>();
const decrementAction = createStandardAction('DECREMENT')<void>();
const resetAction = createStandardAction('RESET')<number>();
// create a store
const store = createStore(reducer, effect);
// listen to the state updates
store.state$.subscribe(state => {
console.log(state);
});
// dispatch actions
store.dispatch(incrementAction());
store.dispatch(incrementAction());
store.dispatch(decrementAction());
store.dispatch(resetAction(42));
// A reducer
function reducer(action, state = 0) {
switch (action.type) {
case (getType(incrementAction)): {
return state + 1;
}
case (getType(decrementAction)): {
return state + 1;
}
case (getType(resetAction)): {
return action.payload;
}
default:
return state;
}
}
// an effect
function effect(actions$, state$) {
return actions$.pipe(
filter(isActionOf([incrementAction])),
withLatestFrom(state$),
tap(([action, state]) => {
// perform sideeffects
console.log('Action', action.type);
console.log('Payload', action.payload);
console.log('State', state);
}),
map(() => {
// or generate another action
return { type: 'ANOTHER_ACTION' };
})
)
}
FAQs
Stream driven redux state manager
The npm package redogs receives a total of 2 weekly downloads. As such, redogs popularity was classified as not popular.
We found that redogs 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.