Comparing version 1.0.0 to 2.0.0
function kefirCast(Kefir, input) { | ||
if (input && input.subscribe && input.subscribeOnNext) { // RxJS | ||
return Kefir.fromBinder(function(emitter) { | ||
return Kefir.stream(function(emitter) { | ||
var subscription = input.subscribe(function onNext(value) { | ||
@@ -15,3 +15,3 @@ emitter.emit(value); | ||
} else if (input && input.onAny && input.offAny) { // Kefir | ||
return Kefir.fromBinder(function(emitter) { | ||
return Kefir.stream(function(emitter) { | ||
function listener(event) { | ||
@@ -36,3 +36,3 @@ switch (event.type) { | ||
} else if (input && input.subscribe && input.onValue) { // Bacon | ||
return Kefir.fromBinder(function(emitter) { | ||
return Kefir.stream(function(emitter) { | ||
return input.subscribe(function(event) { | ||
@@ -39,0 +39,0 @@ if (event.hasValue()) { |
{ | ||
"name": "kefir-cast", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "Convert various types of streams to Kefir streams.", | ||
@@ -35,3 +35,3 @@ "main": "index.js", | ||
"baconjs": "^0.7.41", | ||
"kefir": "^1.1.0", | ||
"kefir": "^2.0.0", | ||
"lodash": "^3.3.1", | ||
@@ -42,4 +42,4 @@ "mocha": "^2.1.0", | ||
"peerDependencies": { | ||
"kefir": "^1.1.0" | ||
"kefir": "^2.0.0" | ||
} | ||
} |
5647