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

continuation.js

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

continuation.js - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "continuation.js",
"description": "Continuation support for Node.js",
"version": "0.0.3",
"version": "0.0.4",
"author": "Daishi Kato <daishi@axlight.com>",

@@ -6,0 +6,0 @@ "dependencies": {

@@ -71,4 +71,3 @@ continuation.js

* Work with increment expression ex. `i++`
* Work with try...catch
* Work with try...catch, throw.
* Better documents.

@@ -75,0 +74,0 @@ * Transform non-tail calls into CPS.

@@ -219,6 +219,21 @@ /*

root.convert_function_call_to_new_cps_call = function(exclude_ids, body) {
var has_side_effect = function(node) {
if (node && node.type === 'CallExpression') {
return true;
} else if (node && node.type === 'UpdateExpression') {
return true;
} else if (node && node.type === 'AssignmentExpression') {
return true;
} else if (node && node.type === 'NewExpression') {
return true;
} else if (node instanceof Object) {
return _.some(node, has_side_effect);
} else {
return false;
}
};
var walk = function(node) {
if (node && (node.type === 'FunctionDeclaration' || node.type === 'FunctionExpression')) {
return;
} else if (node && node.type === 'CallExpression' && node.callee && !(node.callee.type === 'Identifier' && node.callee.name === 'CpsEnableWrapper')) {
} else if (node && node.type === 'CallExpression' && node.callee && !has_side_effect(node.callee) && !(node.callee.type === 'Identifier' && node.callee.name === 'CpsEnableWrapper')) {
var kk_varname = root.generate_new_variable_name('kk', exclude_ids);

@@ -225,0 +240,0 @@ var cpsnode = root.deep_clone(node);

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