refract-preact-xstream
Advanced tools
Comparing version 4.0.0 to 4.1.0
@@ -0,4 +1,4 @@ | ||
import $$observable from 'symbol-observable'; | ||
import xs from 'xstream'; | ||
import dropRepeats from 'xstream/extra/dropRepeats'; | ||
import $$observable from 'symbol-observable'; | ||
import { h, Component } from 'preact'; | ||
@@ -170,2 +170,12 @@ | ||
}; | ||
var createObservable = function (subscribe) { | ||
return (_a = { | ||
subscribe: subscribe | ||
}, | ||
_a[$$observable] = function () { | ||
return this; | ||
}, | ||
_a); | ||
var _a; | ||
}; | ||
@@ -250,13 +260,7 @@ var configureComponent = function (aperture, instance, isValidElement, isComponentClass, handler, errorHandler, mergeProps, decorateProps) { | ||
} | ||
var dataObservable = (_a = { | ||
subscribe: function (listener) { | ||
addListener(listener); | ||
listener.next(createPropsData(instance.props)); | ||
return { unsubscribe: function () { return removeListener(listener); } }; | ||
} | ||
}, | ||
_a[$$observable] = function () { | ||
return this; | ||
}, | ||
_a); | ||
var dataObservable = createObservable(function (listener) { | ||
addListener(listener); | ||
listener.next(createPropsData(instance.props)); | ||
return { unsubscribe: function () { return removeListener(listener); } }; | ||
}); | ||
var component = createComponent(function (propName) { return instance.props[propName]; }, dataObservable, pushEvent, decorateProps); | ||
@@ -316,3 +320,2 @@ var sinkObservable = aperture(component, instance.props, instance.context); | ||
}; | ||
var _a; | ||
}; | ||
@@ -319,0 +322,0 @@ |
29
index.js
@@ -7,5 +7,5 @@ 'use strict'; | ||
var $$observable = _interopDefault(require('symbol-observable')); | ||
var xs = _interopDefault(require('xstream')); | ||
var dropRepeats = _interopDefault(require('xstream/extra/dropRepeats')); | ||
var $$observable = _interopDefault(require('symbol-observable')); | ||
var preact = require('preact'); | ||
@@ -177,2 +177,12 @@ | ||
}; | ||
var createObservable = function (subscribe) { | ||
return (_a = { | ||
subscribe: subscribe | ||
}, | ||
_a[$$observable] = function () { | ||
return this; | ||
}, | ||
_a); | ||
var _a; | ||
}; | ||
@@ -257,13 +267,7 @@ var configureComponent = function (aperture, instance, isValidElement, isComponentClass, handler, errorHandler, mergeProps, decorateProps) { | ||
} | ||
var dataObservable = (_a = { | ||
subscribe: function (listener) { | ||
addListener(listener); | ||
listener.next(createPropsData(instance.props)); | ||
return { unsubscribe: function () { return removeListener(listener); } }; | ||
} | ||
}, | ||
_a[$$observable] = function () { | ||
return this; | ||
}, | ||
_a); | ||
var dataObservable = createObservable(function (listener) { | ||
addListener(listener); | ||
listener.next(createPropsData(instance.props)); | ||
return { unsubscribe: function () { return removeListener(listener); } }; | ||
}); | ||
var component = createComponent(function (propName) { return instance.props[propName]; }, dataObservable, pushEvent, decorateProps); | ||
@@ -323,3 +327,2 @@ var sinkObservable = aperture(component, instance.props, instance.context); | ||
}; | ||
var _a; | ||
}; | ||
@@ -326,0 +329,0 @@ |
{ | ||
"name": "refract-preact-xstream", | ||
"description": "Refract bindings for Preact with xstream: harness the power of reactive programming to supercharge your components!", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "jsnext:main": "index.es.js", |
@@ -47,1 +47,7 @@ import { Stream, Listener, Subscription } from 'xstream' | ||
) => ObservableComponent | ||
export declare const createObservable: ( | ||
subscribe: any | ||
) => { | ||
[x: string]: any | ||
subscribe: any | ||
} |
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
45407
1019