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

@cycle/rx-adapter

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cycle/rx-adapter - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

dist/cycle-rx-adapter.js

@@ -66,3 +66,3 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){

isValidStream: function isValidStream(stream) {
return typeof stream.subscribe === 'function' && typeof stream.onValue !== 'function';
return typeof stream.subscribeOnNext === 'function' && typeof stream.onValue !== 'function';
},

@@ -69,0 +69,0 @@ streamSubscribe: function streamSubscribe(stream, observer) {

@@ -1,1 +0,1 @@

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){(function(global){"use strict";var rx_1=typeof window!=="undefined"?window["Rx"]:typeof global!=="undefined"?global["Rx"]:null;function logToConsoleError(err){var target=err.stack||err;if(console&&console.error){console.error(target)}else if(console&&console.log){console.log(target)}}var RxJSAdapter={adapt:function adapt(originStream,originStreamSubscribe){if(this.isValidStream(originStream)){return originStream}return rx_1.Observable.create(function(destinationObserver){var originObserver={next:function next(x){return destinationObserver.onNext(x)},error:function error(e){return destinationObserver.onError(e)},complete:function complete(){return destinationObserver.onCompleted()}};var dispose=originStreamSubscribe(originStream,originObserver);return function(){if(typeof dispose==="function"){dispose.call(null)}}})},dispose:function dispose(sinks,sinkProxies,sources){Object.keys(sources).forEach(function(k){if(typeof sources[k].dispose==="function"){sources[k].dispose()}});Object.keys(sinkProxies).forEach(function(k){sinkProxies[k].observer.complete()})},makeHoldSubject:function makeHoldSubject(){var stream=new rx_1.ReplaySubject(1);var observer={next:function next(x){stream.onNext(x)},error:function error(err){logToConsoleError(err);stream.onError(err)},complete:function complete(x){stream.onCompleted()}};return{stream:stream,observer:observer}},isValidStream:function isValidStream(stream){return typeof stream.subscribe==="function"&&typeof stream.onValue!=="function"},streamSubscribe:function streamSubscribe(stream,observer){var subscription=stream.subscribe(function(x){return observer.next(x)},function(e){return observer.error(e)},function(){return observer.complete()});return function(){subscription.dispose()}}};Object.defineProperty(exports,"__esModule",{value:true});exports.default=RxJSAdapter}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1]);
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){(function(global){"use strict";var rx_1=typeof window!=="undefined"?window["Rx"]:typeof global!=="undefined"?global["Rx"]:null;function logToConsoleError(err){var target=err.stack||err;if(console&&console.error){console.error(target)}else if(console&&console.log){console.log(target)}}var RxJSAdapter={adapt:function adapt(originStream,originStreamSubscribe){if(this.isValidStream(originStream)){return originStream}return rx_1.Observable.create(function(destinationObserver){var originObserver={next:function next(x){return destinationObserver.onNext(x)},error:function error(e){return destinationObserver.onError(e)},complete:function complete(){return destinationObserver.onCompleted()}};var dispose=originStreamSubscribe(originStream,originObserver);return function(){if(typeof dispose==="function"){dispose.call(null)}}})},dispose:function dispose(sinks,sinkProxies,sources){Object.keys(sources).forEach(function(k){if(typeof sources[k].dispose==="function"){sources[k].dispose()}});Object.keys(sinkProxies).forEach(function(k){sinkProxies[k].observer.complete()})},makeHoldSubject:function makeHoldSubject(){var stream=new rx_1.ReplaySubject(1);var observer={next:function next(x){stream.onNext(x)},error:function error(err){logToConsoleError(err);stream.onError(err)},complete:function complete(x){stream.onCompleted()}};return{stream:stream,observer:observer}},isValidStream:function isValidStream(stream){return typeof stream.subscribeOnNext==="function"&&typeof stream.onValue!=="function"},streamSubscribe:function streamSubscribe(stream,observer){var subscription=stream.subscribe(function(x){return observer.next(x)},function(e){return observer.error(e)},function(){return observer.complete()});return function(){subscription.dispose()}}};Object.defineProperty(exports,"__esModule",{value:true});exports.default=RxJSAdapter}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1]);

@@ -54,3 +54,3 @@ "use strict";

isValidStream: function (stream) {
return (typeof stream.subscribe === 'function' &&
return (typeof stream.subscribeOnNext === 'function' &&
typeof stream.onValue !== 'function');

@@ -57,0 +57,0 @@ },

{
"name": "@cycle/rx-adapter",
"version": "1.0.2",
"version": "1.0.3",
"description": "Cycle.js RxJS 4 Stream Adapter",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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