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

react-observable-mixin

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-observable-mixin - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

lib/RxObservableMixin.js

@@ -7,4 +7,2 @@ 'use strict';

var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

@@ -60,10 +58,5 @@

return Object.keys(props).reduce(function (observables, propKey) {
var _propKey$match = propKey.match(/^(.+)\$$/);
var matches = propKey.match(/^(.+)\$$/);
if (matches && props[propKey] && typeof props[propKey].subscribe === 'function') observables[matches[1]] = props[propKey];
var _propKey$match2 = _slicedToArray(_propKey$match, 2);
var name = _propKey$match2[1];
if (name && props[propKey] && typeof props[propKey].subscribe === 'function') observables[name] = props[propKey];
return observables;

@@ -70,0 +63,0 @@ }, {});

2

package.json
{
"name": "react-observable-mixin",
"version": "1.0.1",
"version": "1.0.2",
"description": "Container like observable mixin for ReactJS.",

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

@@ -41,9 +41,9 @@ import Rx from 'rx';

.reduce((observables, propKey) => {
const [, name] = propKey.match(/^(.+)\$$/);
const matches = propKey.match(/^(.+)\$$/);
if (
name &&
matches &&
props[propKey] &&
typeof props[propKey].subscribe === 'function'
)
observables[name] = props[propKey];
observables[matches[1]] = props[propKey];

@@ -50,0 +50,0 @@ return observables;

@@ -46,3 +46,3 @@ 'use strict';

const instance = TestUtils.renderIntoDocument(
<Component name$={name$}/>
<Component name$={name$} otherProp="hello"/>
);

@@ -49,0 +49,0 @@

Sorry, the diff of this file is too big to display

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