cycle-gear
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -48,7 +48,4 @@ import { adapt } from '@cycle/run/lib/adapt'; | ||
return gear => { | ||
let state; | ||
if (modelCache.has(gear)) { | ||
state = modelCache.get(gear); | ||
} | ||
else { | ||
let state = modelCache.get(gear); | ||
if (!state) { | ||
const actions = gear.intent ? gear.intent(sources) : defaultIntent(sources); | ||
@@ -91,7 +88,4 @@ state = xs.fromObservable(gear.model ? gear.model(actions) : defaultModel(actions)) | ||
for (let gear of gears) { | ||
let state; | ||
if (modelCache.has(gear)) { | ||
state = modelCache.get(gear); | ||
} | ||
else { | ||
let state = modelCache.get(gear); | ||
if (!state) { | ||
const wrappedSources = sourcesWrapper(sources, gear); | ||
@@ -98,0 +92,0 @@ const actions = gear.intent ? gear.intent(wrappedSources) : defaultIntent(wrappedSources); |
@@ -102,7 +102,4 @@ "use strict"; | ||
return function (gear) { | ||
var state; | ||
if (modelCache.has(gear)) { | ||
state = modelCache.get(gear); | ||
} | ||
else { | ||
var state = modelCache.get(gear); | ||
if (!state) { | ||
var actions_1 = gear.intent ? gear.intent(sources) : defaultIntent(sources); | ||
@@ -156,7 +153,4 @@ state = xstream_1.default.fromObservable(gear.model ? gear.model(actions_1) : defaultModel(actions_1)) | ||
var _loop_1 = function (gear) { | ||
var state = void 0; | ||
if (modelCache.has(gear)) { | ||
state = modelCache.get(gear); | ||
} | ||
else { | ||
var state = modelCache.get(gear); | ||
if (!state) { | ||
var wrappedSources = sourcesWrapper(sources, gear); | ||
@@ -163,0 +157,0 @@ var actions_2 = gear.intent ? gear.intent(wrappedSources) : defaultIntent(wrappedSources); |
14
index.ts
@@ -105,6 +105,4 @@ import { adapt } from '@cycle/run/lib/adapt' | ||
return gear => { | ||
let state: xs<any> | ||
if (modelCache.has(gear)) { | ||
state = modelCache.get(gear) as xs<any> | ||
} else { | ||
let state = modelCache.get(gear) | ||
if (!state) { | ||
const actions = gear.intent ? gear.intent(sources) : defaultIntent(sources) | ||
@@ -117,3 +115,3 @@ state = xs.fromObservable(gear.model ? gear.model(actions) : defaultModel(actions)) | ||
const views = teeth.reduce((accum, tooth) => Object.assign(accum, { | ||
[tooth]: state.filter(toothFilter(tooth, (gear.teeth || {})[tooth])).map(toothView(tooth, (gear.teeth || {})[tooth])) | ||
[tooth]: state!.filter(toothFilter(tooth, (gear.teeth || {})[tooth])).map(toothView(tooth, (gear.teeth || {})[tooth])) | ||
}), {}) | ||
@@ -175,6 +173,4 @@ return views | ||
for (let gear of gears) { | ||
let state: xs<any> | ||
if (modelCache.has(gear)) { | ||
state = modelCache.get(gear) as xs<any> | ||
} else { | ||
let state = modelCache.get(gear) | ||
if (!state) { | ||
const wrappedSources = sourcesWrapper(sources, gear) | ||
@@ -181,0 +177,0 @@ const actions = gear.intent ? gear.intent(wrappedSources) : defaultIntent(wrappedSources) |
{ | ||
"name": "cycle-gear", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"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
67298
703