
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@actra-development-oss/redux-observable-decorator
Advanced tools
Decorators for Redux Observable - forked from (unmaintained?) redux-observable-decorator to support current versions of redux / redux-observable
When using Redux with Angular with ng-redux and redux-observable, it's common to create your epics as an injectable class, and when configuring the store - creating an epic middleware for each one, or using combineEpics:
@Injectable()
export class SomeEpics {
epicOne = (action$) => action$.ofType('PING').mapTo({type: 'PONG'});
epicTwo = (action$) => action$.ofType('ACTION_IN').mapTo({type: 'ACTION_OUT'});
}
@NgModule({
})
export class AppModule {
constructor(ngRedux:NgRedux, someEpics:SomeEpics) {
let epics = combineEpics(
someEpics.epicOne,
someEpics.epicTwo
)
ngRedux.configureStore(reducer,[createEpicMidleware(epics)])
// or
let epicOneMiddleware = createMiddleware(someEpics.epicOne);
let epicTwoMiddleware = createMiddleware(someEpics.epicOne);
ngRedux.configureStore(reducer,[epicOneMiddleware, epicTwoMiddleware)])
}
}
This decorator is intended to make it easier to mark which properties / methods in a class are Epics to simplify creating the epic middleware for your application.
import { Epic } from 'redux-observable-decorator'
@Injectable()
export class SomeEpics {
@Epic() epicOne = (action$) => action$.ofType('PING').mapTo({type: 'PONG'});
@Epic() epicTwo = (action$) => action$.ofType('ACTION_IN').mapTo({type: 'ACTION_OUT'});
}
import { createEpics } from 'redux-observable-decorator';
@NgModule({
})
export class AppModule {
constructor(ngRedux: NgRedux, someEpics: SomeEpics) {
const {middleware, epic} = createEpics(someEpics)
ngRedux.confgureStore(reducer, [middleware]);
middleware.run(epic);
}
}
This can be used with vanilla redux also - as seen in the unit tests...
class Test {
@Epic() epic = (action$) => action$.ofType('TEST_IN').mapTo({ type: 'TEST_OUT' });
}
const reducer = (state = [], action) => state.concat(action);
const epics = new Test();
const {middleware, epic} = createEpics(epics);
const store = createStore(reducer, applyMiddleware(epicMiddleware));
middleware.run(epic);
FAQs
Decorators for Redux Observable
We found that @actra-development-oss/redux-observable-decorator 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 discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.