zen-observable
Advanced tools
Comparing version 0.3.0 to 0.4.0
{ | ||
"name": "zen-observable", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"repository": "zenparsing/zen-observable", | ||
"description": "An Implementation of ES Observables", | ||
@@ -5,0 +6,0 @@ "homepage": "https://github.com/zenparsing/zen-observable", |
@@ -146,3 +146,3 @@ // === Symbol Support === | ||
// If the stream if closed, then return undefined | ||
// If the stream is closed, then return undefined | ||
if (subscriptionClosed(subscription)) | ||
@@ -152,20 +152,10 @@ return undefined; | ||
let observer = subscription._observer; | ||
let m = getMethod(observer, "next"); | ||
try { | ||
// If the observer doesn't support "next", then return undefined | ||
if (!m) | ||
return undefined; | ||
let m = getMethod(observer, "next"); | ||
// If the observer doesn't support "next", then return undefined | ||
if (!m) | ||
return undefined; | ||
// Send the next value to the sink | ||
return m.call(observer, value); | ||
} catch (e) { | ||
// If the observer throws, then close the stream and rethrow the error | ||
try { closeSubscription(subscription) } | ||
finally { throw e } | ||
} | ||
// Send the next value to the sink | ||
return m.call(observer, value); | ||
}, | ||
@@ -385,3 +375,3 @@ | ||
error(e) { return observer.error(e) }, | ||
error(e) { observer.error(e) }, | ||
@@ -388,0 +378,0 @@ complete() { |
@@ -146,3 +146,3 @@ 'use strict'; (function(fn, name) { if (typeof exports !== 'undefined') fn(exports, module); else if (typeof self !== 'undefined') fn(name === '*' ? self : (name ? self[name] = {} : {})); })(function(exports, module) { // === Symbol Support === | ||
// If the stream if closed, then return undefined | ||
// If the stream is closed, then return undefined | ||
if (subscriptionClosed(subscription)) | ||
@@ -152,20 +152,10 @@ return undefined; | ||
var observer = subscription._observer; | ||
var m = getMethod(observer, "next"); | ||
try { | ||
// If the observer doesn't support "next", then return undefined | ||
if (!m) | ||
return undefined; | ||
var m$0 = getMethod(observer, "next"); | ||
// If the observer doesn't support "next", then return undefined | ||
if (!m$0) | ||
return undefined; | ||
// Send the next value to the sink | ||
return m$0.call(observer, value); | ||
} catch (e) { | ||
// If the observer throws, then close the stream and rethrow the error | ||
try { closeSubscription(subscription) } | ||
finally { throw e } | ||
} | ||
// Send the next value to the sink | ||
return m.call(observer, value); | ||
}, | ||
@@ -186,9 +176,9 @@ | ||
var m$1 = getMethod(observer, "error"); | ||
var m$0 = getMethod(observer, "error"); | ||
// If the sink does not support "error", then throw the error to the caller | ||
if (!m$1) | ||
if (!m$0) | ||
throw value; | ||
value = m$1.call(observer, value); | ||
value = m$0.call(observer, value); | ||
@@ -218,6 +208,6 @@ } catch (e) { | ||
var m$2 = getMethod(observer, "complete"); | ||
var m$1 = getMethod(observer, "complete"); | ||
// If the sink does not support "complete", then return undefined | ||
value = m$2 ? m$2.call(observer, value) : undefined; | ||
value = m$1 ? m$1.call(observer, value) : undefined; | ||
@@ -387,3 +377,3 @@ } catch (e) { | ||
error: function(e) { return observer.error(e) }, | ||
error: function(e) { observer.error(e) }, | ||
@@ -390,0 +380,0 @@ complete: function() { |
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
61094
1465