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

fluxible

Package Overview
Dependencies
Maintainers
5
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluxible - npm Package Compare versions

Comparing version 0.2.9 to 0.2.10

.idea/.name

3

lib/Fluxible.js

@@ -221,4 +221,3 @@ /**

var context = self.createContext();
context.rehydrate(obj.context);
callback(null, context);
context.rehydrate(obj.context, callback);
});

@@ -225,0 +224,0 @@ };

@@ -9,2 +9,5 @@ /**

var objectAssign = require('object-assign');
var React = require('react');
var FluxibleComponent = React.createFactory(require('./FluxibleComponent'));
var async = require('async');
require('setimmediate');

@@ -223,16 +226,34 @@

*/
FluxContext.prototype.rehydrate = function rehydrate(obj) {
FluxContext.prototype.rehydrate = function rehydrate(obj, callback) {
var self = this;
obj.plugins = obj.plugins || {};
self._plugins.forEach(function pluginsEach(plugin) {
if ('function' === typeof plugin.rehydrate) {
// Send in the plugin namespace state and provide access to the application instance
plugin.rehydrate(obj.plugins[plugin.name], self);
var pluginTasks = this._plugins.filter(function (plugin) {
return 'function' === typeof plugin.rehydrate;
}).map(function (plugin) {
return function (asyncCallback) {
if (2 === plugin.rehydrate.length) { // Async plugin
plugin.rehydrate(obj.plugins[plugin.name], asyncCallback);
} else { // Sync plugin
try {
plugin.rehydrate(obj.plugins[plugin.name]);
} catch (e) {
asyncCallback(e);
return;
}
asyncCallback();
}
};
});
async.parallel(pluginTasks, function rehydratePluginTasks(err) {
if (err) {
callback(err);
return;
}
self._dispatcher = self._app.createDispatcherInstance(self.getStoreContext());
self._dispatcher.rehydrate(obj.dispatcher || {});
callback(null, self);
});
self._dispatcher = this._app.createDispatcherInstance(self.getStoreContext());
self._dispatcher.rehydrate(obj.dispatcher || {});
};
module.exports = FluxContext;
{
"name": "fluxible",
"version": "0.2.9",
"version": "0.2.10",
"description": "A pluggable container for isomorphic flux applications",

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

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