New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-tailcall-optimization

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-tailcall-optimization - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11

.idea/inspectionProfiles/profiles_settings.xml

20

build/lib.js

@@ -32,7 +32,7 @@ 'use strict';

var assignmentsToTmpInputs = tmpInputVariables.map(function (tmpInputVar, index) {
return t.assignmentExpression('=', tmpInputVar, tailCall.node.argument.arguments[index]);
return t.expressionStatement(t.assignmentExpression('=', tmpInputVar, tailCall.node.argument.arguments[index]));
});
// and then we do a swap
var swapTmpInputWithInput = inputVariables.map(function (inputVar, index) {
return t.assignmentExpression('=', inputVar, tmpInputVariables[index]);
return t.expressionStatement(t.assignmentExpression('=', inputVar, tmpInputVariables[index]));
});

@@ -55,8 +55,6 @@

if (path.node.id) {
var _findTailCalls = findTailCalls(path, path.node.id.name);
var _findTailCalls = findTailCalls(path, path.node.id.name),
tailCalls = _findTailCalls.tailCalls,
needsClosure = _findTailCalls.needsClosure;
var tailCalls = _findTailCalls.tailCalls;
var needsClosure = _findTailCalls.needsClosure;
if (tailCalls.length > 0 && !needsClosure) {

@@ -72,8 +70,6 @@ optimizeTailCalls(path, tailCalls, needsClosure);

var _findTailCalls2 = findTailCalls(functionBody, functionName);
var _findTailCalls2 = findTailCalls(functionBody, functionName),
tailCalls = _findTailCalls2.tailCalls,
needsClosure = _findTailCalls2.needsClosure;
var tailCalls = _findTailCalls2.tailCalls;
var needsClosure = _findTailCalls2.needsClosure;
if (tailCalls.length > 0 && !needsClosure) {

@@ -80,0 +76,0 @@ // @todo for now when closure is detected skip TCO - we should implement it also in that case

13

package.json
{
"name": "babel-plugin-tailcall-optimization",
"version": "1.0.10",
"version": "1.0.11",
"description": "Tail call optimization for JavaScript!",

@@ -28,10 +28,5 @@ "main": "build/lib.js",

"homepage": "https://github.com/krzkaczor/babel-plugin-tailcall-optimization",
"dependencies": {
"devDependencies": {
"babel-cli": "^6.11.0",
"babel-core": "^6.13.0",
"babel-preset-es2015": "^6.13.0",
"babel-traverse": "^6.13.0",
"babylon": "^6.8.0"
},
"devDependencies": {
"babel-register": "6.11.6",

@@ -43,2 +38,6 @@ "benchmark": "2.1.1",

},
"peerDependencies": {
"babel-core": "^6.0.0",
"babel-traverse": "^6.13.0"
},
"standard": {

@@ -45,0 +44,0 @@ "env": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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