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

babel-plugin-fuck-optimization

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-fuck-optimization

Plugin for Babel which fucks all the optimizations in your code

  • 2.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

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, ClassMethod, FunctionExpression or ArrowFunctionExpression (basically all functions in your code) 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.

FAQs

Package last updated on 11 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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