feature - added effects combiner
ADD
src/effects/effects.combiner.ts
+import * as http from 'http';
+import { Observable, merge } from 'rxjs';
+import { RequestEffect } from './effects.interface';
+import { HttpRequest } from '../http.interface';
+
+export const combineEffects = (...effects: RequestEffect[]) => (request$: Observable<HttpRequest>) =>
+ merge(
+ ...effects.map(effect => {
+ const output$ = effect(request$);
+
+ if (!output$) {
+ throw new TypeError(`combineEffects: one of the provided Effects does not return a stream!`);
+ }
+
+ return output$;
+ })
+ );

ADD
src/effects/effects.interface.ts
+import { Observable } from 'rxjs';
+import { HttpRequest } from '../http.interface';
+
+export type EffectResponse = {
+ status: number,
+ body?: object,
+ headers?: Record<string, string>,
+};
+
+export type RequestEffect = (request$: Observable<HttpRequest>) => Observable<EffectResponse>;

ADD
src/effects/index.ts
+export * from './effects.combiner';
+export * from './effects.interface';

ADD
src/http.interface.ts
+import * as http from 'http';
+
+export type HttpRequest = http.IncomingMessage;
+export type HttpResponse = http.ServerResponse;
+export type HttpHeaders = Record<string, string>;
+
+export type Http = {
+ req: HttpRequest,
+ res: HttpResponse,
+};
+
+export enum ContentType {
+ APPLICATION_JSON = 'application/json',
+}

feature - added effects combiner