zen-observable
Advanced tools
Comparing version 0.8.10 to 0.8.11
@@ -405,2 +405,3 @@ 'use strict'; | ||
var subscription = void 0; | ||
var index = 0; | ||
@@ -416,7 +417,7 @@ function startNext(next) { | ||
complete: function () { | ||
if (sources.length === 0) { | ||
if (index === sources.length) { | ||
subscription = undefined; | ||
observer.complete(); | ||
} else { | ||
startNext(C.from(sources.shift())); | ||
startNext(C.from(sources[index++])); | ||
} | ||
@@ -609,4 +610,4 @@ } | ||
}, | ||
configurabe: true | ||
configurable: true | ||
}); | ||
} |
{ | ||
"name": "zen-observable", | ||
"version": "0.8.10", | ||
"version": "0.8.11", | ||
"repository": "zenparsing/zen-observable", | ||
@@ -5,0 +5,0 @@ "description": "An Implementation of ES Observables", |
@@ -324,2 +324,3 @@ // === Symbol Support === | ||
let subscription; | ||
let index = 0; | ||
@@ -331,7 +332,7 @@ function startNext(next) { | ||
complete() { | ||
if (sources.length === 0) { | ||
if (index === sources.length) { | ||
subscription = undefined; | ||
observer.complete(); | ||
} else { | ||
startNext(C.from(sources.shift())); | ||
startNext(C.from(sources[index++])); | ||
} | ||
@@ -475,4 +476,4 @@ }, | ||
}, | ||
configurabe: true, | ||
configurable: true, | ||
}); | ||
} |
@@ -14,2 +14,18 @@ import assert from 'assert'; | ||
}); | ||
it('can be used multiple times to produce the same results', async () => { | ||
const list1 = []; | ||
const list2 = []; | ||
const concatenated = Observable.from([1, 2, 3, 4]) | ||
.concat(Observable.of(5, 6, 7)); | ||
await concatenated | ||
.forEach(x => list1.push(x)); | ||
await concatenated | ||
.forEach(x => list2.push(x)); | ||
assert.deepEqual(list1, [1, 2, 3, 4, 5, 6, 7]); | ||
assert.deepEqual(list2, [1, 2, 3, 4, 5, 6, 7]); | ||
}); | ||
}); |
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
71359
2152