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

@cycle/core

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cycle/core - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

14

lib/cycle.js

@@ -63,8 +63,10 @@ "use strict";

var subscription = new Rx.CompositeDisposable();
for (var _name4 in observables) {
if (observables.hasOwnProperty(_name4) && subjects.hasOwnProperty(_name4) && !subjects[_name4].isDisposed) {
subscription.add(observables[_name4].doOnError(logToConsoleError).subscribe(subjects[_name4].asObserver()));
setTimeout(function () {
for (var _name4 in observables) {
if (observables.hasOwnProperty(_name4) && subjects.hasOwnProperty(_name4) && !subjects[_name4].isDisposed) {
subscription.add(observables[_name4].doOnError(logToConsoleError).subscribe(subjects[_name4].asObserver()));
}
}
}
observer.onNext(subscription);
observer.onNext(subscription);
}, 1);

@@ -79,3 +81,3 @@ return function dispose() {

};
}).delay(1);
});
}

@@ -82,0 +84,0 @@

{
"name": "@cycle/core",
"version": "2.0.0",
"version": "2.0.1",
"author": "Andre Staltz",

@@ -5,0 +5,0 @@ "description": "A fully reactive JavaScript framework for Human-Computer Interaction",

@@ -61,15 +61,17 @@ let Rx = require(`rx`)

let subscription = new Rx.CompositeDisposable()
for (let name in observables) {
if (observables.hasOwnProperty(name) &&
subjects.hasOwnProperty(name) &&
!subjects[name].isDisposed)
{
subscription.add(
observables[name]
.doOnError(logToConsoleError)
.subscribe(subjects[name].asObserver())
)
setTimeout(() => {
for (let name in observables) {
if (observables.hasOwnProperty(name) &&
subjects.hasOwnProperty(name) &&
!subjects[name].isDisposed)
{
subscription.add(
observables[name]
.doOnError(logToConsoleError)
.subscribe(subjects[name].asObserver())
)
}
}
}
observer.onNext(subscription)
observer.onNext(subscription)
}, 1)

@@ -84,3 +86,3 @@ return function dispose() {

}
}).delay(1)
})
}

@@ -87,0 +89,0 @@

@@ -73,2 +73,23 @@ 'use strict';

it('should happen on event loop\'s next tick', function (done) {
function app() {
return {
other: Cycle.Rx.Observable.from([10, 20, 30]),
};
}
let mutable = 'wrong';
function driver(req) {
return req.map(x => 'a' + 10)
}
let [requests, responses] = Cycle.run(app, {other: driver});
responses.other.take(1).subscribe(x => {
assert.strictEqual(x, 'a10');
assert.strictEqual(mutable, 'correct');
requests.dispose();
responses.dispose();
done();
});
mutable = 'correct';
});
it('should not work after has been disposed', function (done) {

@@ -75,0 +96,0 @@ let number$ = Cycle.Rx.Observable.range(1, 3)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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