callbag-flatten
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -5,3 +5,2 @@ 'use strict'; | ||
if (start !== 0) return; | ||
let outerEnded = false; | ||
let outerTalkback; | ||
@@ -13,3 +12,3 @@ let innerTalkback; | ||
innerTalkback && innerTalkback(2); | ||
if (!outerEnded) outerTalkback(2); | ||
outerTalkback && outerTalkback(2); | ||
} | ||
@@ -33,3 +32,3 @@ } | ||
} else if (t === 2) { | ||
if (outerEnded) sink(2); | ||
if (!outerTalkback) sink(2); | ||
else { | ||
@@ -46,3 +45,3 @@ innerTalkback = void 0; | ||
if (!innerTalkback) sink(2); | ||
else outerEnded = true; | ||
else outerTalkback = void 0; | ||
} | ||
@@ -49,0 +48,0 @@ }); |
const flatten = source => (start, sink) => { | ||
if (start !== 0) return; | ||
let outerEnded = false; | ||
let outerTalkback; | ||
@@ -10,3 +9,3 @@ let innerTalkback; | ||
innerTalkback && innerTalkback(2); | ||
if (!outerEnded) outerTalkback(2); | ||
outerTalkback && outerTalkback(2); | ||
} | ||
@@ -30,3 +29,3 @@ } | ||
} else if (t === 2) { | ||
if (outerEnded) sink(2); | ||
if (!outerTalkback) sink(2); | ||
else { | ||
@@ -43,3 +42,3 @@ innerTalkback = void 0; | ||
if (!innerTalkback) sink(2); | ||
else outerEnded = true; | ||
else outerTalkback = void 0; | ||
} | ||
@@ -46,0 +45,0 @@ }); |
{ | ||
"name": "callbag-flatten", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "Callbag operator that flattens a higher-order callbag source", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
16721
479