Skip to content

bniwredyc/babel-plugin-fuck-optimization

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-fuck-optimization

Use this plugin when you want to see beautiful bailouts in your code.

Transforms this:

function add(a, b) {
  return a + b;
}

into this:

function add(a, b) {
  var __deoptimization = {
    __proto__: "notsofast"
  };
  
  return a + b;
}

It traverses all the BlockStatement and if its parent is FunctionDeclaration or ClassMethod it pushes the new TryStatement with CatchClause within the BlockStatement (optimized in V8 5.3.1) it adds an object literal declaration with modified __proto__ property.

About

Plugin for Babel which prevents optimizations of your code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%