Comparing version 5.3.2 to 5.3.3
@@ -0,1 +1,11 @@ | ||
<a name="5.3.3"></a> | ||
## [5.3.3](https://github.com/staltz/xstream/compare/v5.3.2...v5.3.3) (2016-08-15) | ||
### Bug Fixes | ||
* **dropRepeats:** handle circular dependencies ([38052da](https://github.com/staltz/xstream/commit/38052da)) | ||
<a name="5.3.2"></a> | ||
@@ -2,0 +12,0 @@ ## [5.3.2](https://github.com/staltz/xstream/compare/v5.3.1...v5.3.2) (2016-07-23) |
@@ -29,6 +29,6 @@ "use strict"; | ||
var v = this.v; | ||
if (v === empty || !this.isEq(t, v)) { | ||
u._n(t); | ||
} | ||
if (v !== empty && this.isEq(t, v)) | ||
return; | ||
this.v = t; | ||
u._n(t); | ||
}; | ||
@@ -35,0 +35,0 @@ DropRepeatsOperator.prototype._e = function (err) { |
{ | ||
"name": "xstream", | ||
"version": "5.3.2", | ||
"version": "5.3.3", | ||
"description": "An extremely intuitive, small, and fast functional reactive stream library for JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -32,6 +32,5 @@ import {Operator, Stream} from '../core'; | ||
const v = this.v; | ||
if (v === empty || !this.isEq(t, v)) { | ||
u._n(t); | ||
} | ||
if (v !== empty && this.isEq(t, v)) return; | ||
this.v = t; | ||
u._n(t); | ||
} | ||
@@ -38,0 +37,0 @@ |
@@ -40,2 +40,27 @@ /// <reference path="../../typings/globals/mocha/index.d.ts" /> | ||
}); | ||
it('should drop consecutive duplicate numbers, with a circular stream dependency', (done) => { | ||
const streamProxy = xs.create(); | ||
const input = xs.of(0, 0, 1, 1, 1) | ||
const stream = xs.merge(streamProxy, input).compose(dropRepeats()); | ||
streamProxy.imitate(stream); | ||
const expected = [0, 1]; | ||
stream.addListener({ | ||
next: (x: number) => { | ||
assert.equal(x, expected.shift()); | ||
}, | ||
error: (err: any) => done(err), | ||
complete: () => {}, | ||
}); | ||
input.addListener({ | ||
next: (x: number) => {}, | ||
error: (err: any) => done(err), | ||
complete: () => { | ||
assert.equal(expected.length, 0); | ||
done(); | ||
}, | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
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
847770
16353