babel-plugin-fuck-optimization
Advanced tools
Comparing version 2.0.0 to 2.1.0
{ | ||
"name": "babel-plugin-fuck-optimization", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Plugin for Babel which fucks all the optimizations in your code", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -7,3 +7,19 @@ var deoptimizationVariableName = '__deoptimization' | ||
var isDeoptimizablePath = function (path) { | ||
return t.isFunctionDeclaration(path.parentPath) || t.isClassMethod(path.parentPath) | ||
if (t.isFunctionDeclaration(path.parentPath)) { | ||
return true; | ||
} | ||
if (t.isClassMethod(path.parentPath)) { | ||
return true; | ||
} | ||
if (t.isFunctionExpression(path.parentPath)) { | ||
return true; | ||
} | ||
if (t.isArrowFunctionExpression(path.parentPath)) { | ||
return true; | ||
} | ||
return false; | ||
}; | ||
@@ -10,0 +26,0 @@ |
4920
96