cycle-gear
Advanced tools
Comparing version 5.0.2 to 5.1.0
@@ -23,2 +23,3 @@ import { Observable } from 'xstream'; | ||
init: () => TAccumulator; | ||
isolate?: (sink: Observable<any>, gear: Gear<TActions, TModel>) => Observable<any>; | ||
} | ||
@@ -25,0 +26,0 @@ export declare type Transmission = ((sources: any) => Observable<Gear<any, any>>) | Observable<Gear<any, any>>; |
@@ -97,5 +97,12 @@ import { adapt } from '@cycle/run/lib/adapt'; | ||
for (let tooth of teeth) { | ||
views[tooth].push(state | ||
let view = state | ||
.filter(toothFilter(tooth, (gear.teeth || {})[tooth])) | ||
.map(state => [toothView(tooth, (gear.teeth || {})[tooth])(state), gear])); | ||
.map(state => [toothView(tooth, (gear.teeth || {})[tooth])(state), gear]); | ||
const isolator = connectors.has(tooth) | ||
? connectors.get(tooth).isolate || defaultConnector.isolate | ||
: defaultConnector.isolate; | ||
if (isolator) { | ||
view = xs.fromObservable(isolator(view, gear)); | ||
} | ||
views[tooth].push(view); | ||
} | ||
@@ -102,0 +109,0 @@ } |
@@ -23,2 +23,3 @@ import { Observable } from 'xstream'; | ||
init: () => TAccumulator; | ||
isolate?: (sink: Observable<any>, gear: Gear<TActions, TModel>) => Observable<any>; | ||
} | ||
@@ -25,0 +26,0 @@ export declare type Transmission = ((sources: any) => Observable<Gear<any, any>>) | Observable<Gear<any, any>>; |
@@ -162,5 +162,12 @@ "use strict"; | ||
var _loop_2 = function (tooth) { | ||
views[tooth].push(state | ||
var view = state | ||
.filter(toothFilter(tooth, (gear.teeth || {})[tooth])) | ||
.map(function (state) { return [toothView(tooth, (gear.teeth || {})[tooth])(state), gear]; })); | ||
.map(function (state) { return [toothView(tooth, (gear.teeth || {})[tooth])(state), gear]; }); | ||
var isolator = connectors.has(tooth) | ||
? connectors.get(tooth).isolate || defaultConnector.isolate | ||
: defaultConnector.isolate; | ||
if (isolator) { | ||
view = xstream_1.default.fromObservable(isolator(view, gear)); | ||
} | ||
views[tooth].push(view); | ||
}; | ||
@@ -167,0 +174,0 @@ try { |
12
index.ts
@@ -30,2 +30,3 @@ import { adapt } from '@cycle/run/lib/adapt' | ||
init: () => TAccumulator | ||
isolate?: (sink: Observable<any>, gear: Gear<TActions, TModel>) => Observable<any> | ||
} | ||
@@ -182,5 +183,12 @@ | ||
for (let tooth of teeth) { | ||
views[tooth].push(state | ||
let view = state | ||
.filter(toothFilter(tooth, (gear.teeth || {})[tooth])) | ||
.map(state => [toothView(tooth, (gear.teeth || {})[tooth])(state), gear])) | ||
.map(state => [toothView(tooth, (gear.teeth || {})[tooth])(state), gear]) | ||
const isolator = connectors.has(tooth) | ||
? connectors.get(tooth)!.isolate || defaultConnector.isolate | ||
: defaultConnector.isolate | ||
if (isolator) { | ||
view = xs.fromObservable(isolator(view, gear)) | ||
} | ||
views[tooth].push(view) | ||
} | ||
@@ -187,0 +195,0 @@ } |
{ | ||
"name": "cycle-gear", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"description": "Main function factory for CycleJS", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68598
727