Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xstream

Package Overview
Dependencies
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xstream - npm Package Compare versions

Comparing version 5.3.2 to 5.3.3

10

CHANGELOG.md

@@ -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)

6

extra/dropRepeats.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc