Comparing version 3.2.0 to 3.2.1
28
index.js
@@ -18,16 +18,2 @@ 'use strict'; | ||
}); | ||
} else if (input && input.subscribe && input.onErrorResumeNext) { // RxJS 5 | ||
return Kefir.stream(function(emitter) { | ||
var subscription = input.subscribe(function onNext(value) { | ||
emitter.emit(value); | ||
}, function onError(err) { | ||
emitter.error(err); | ||
emitter.end(); | ||
}, function onCompleted() { | ||
emitter.end(); | ||
}); | ||
return function() { | ||
subscription.unsubscribe(); | ||
}; | ||
}); | ||
} else if (input && input.onAny && input.offAny) { // Kefir | ||
@@ -71,2 +57,16 @@ return Kefir.stream(function(emitter) { | ||
}); | ||
} else if (input && input.subscribe && input.pipe && input.lift) { // RxJS 5 | ||
return Kefir.stream(function(emitter) { | ||
var subscription = input.subscribe(function onNext(value) { | ||
emitter.emit(value); | ||
}, function onError(err) { | ||
emitter.error(err); | ||
emitter.end(); | ||
}, function onCompleted() { | ||
emitter.end(); | ||
}); | ||
return function() { | ||
subscription.unsubscribe(); | ||
}; | ||
}); | ||
} else { | ||
@@ -73,0 +73,0 @@ return Kefir.constant(input); |
{ | ||
"name": "kefir-cast", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Convert various types of streams to Kefir streams.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
8031