Socket
Socket
Sign inDemoInstall

zen-observable

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zen-observable - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

3

package.json
{
"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() {

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