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 1.0.4-rc1 to 1.0.4-rc2

2

package.json
{
"name": "fluxible",
"version": "1.0.4-rc1",
"version": "1.0.4-rc2",
"description": "A pluggable container for isomorphic flux applications",

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

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

function callActionInternal(actionContext, action, payload, resolve, reject) {
try {
var syncResult = action(actionContext, payload, function (err, result) {
if (err) {
reject(err);
} else {
resolve(result);
}
});
if (isPromise(syncResult)) {
syncResult.then(resolve, reject);
} else if (action.length < 3) {
resolve(syncResult);
}
} catch (e) {
reject(e);
}
}
function callActionNoImmediate(actionContext, action, payload, done) {
var executeActionPromise = new Promise(function (resolve, reject) {
callActionInternal(actionContext, action, payload, resolve, reject);
});
return finalizeAction(executeActionPromise, done);
}
/**

@@ -45,9 +18,22 @@ * Call an action supporting Promise expectations on invocation.

var executeActionPromise = new Promise(function (resolve, reject) {
setImmediate(callActionInternal.bind(null, actionContext, action, payload, resolve, reject));
setImmediate(function () {
try {
var syncResult = action(actionContext, payload, function (err, result) {
if (err) {
reject(err);
} else {
resolve(result);
}
});
if (isPromise(syncResult)) {
syncResult.then(resolve, reject);
} else if (action.length < 3) {
resolve(syncResult);
}
} catch (e) {
reject(e);
}
});
});
return finalizeAction(executeActionPromise, done);
}
function finalizeAction(executeActionPromise, done) {
if (done) {

@@ -68,2 +54,1 @@ executeActionPromise

module.exports = callAction;
module.exports.callActionNoImmediate = callActionNoImmediate;

@@ -33,5 +33,5 @@ /**

});
return callAction.callActionNoImmediate(this, action, payload, callback);
return callAction(this, action, payload, callback);
};
module.exports = MockActionContext;
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