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

babel-plugin-macaroni

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-macaroni

Babel plugin for macaroni

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-macaroni

A babel plugin for transforming code into macaroni-supported code.

What?

  • a + b becomes Operator.add(a, b)
  • a += b becomes a = Operator.add(a, b)
  • ++a becomes (a = Operator.increment(a))
  • -a becomes Operator.negate(a)

Usage

  1. Install babel and this node module
  2. Add this module as a babel plugin (either with macaroni or babel-plugin-macaroni, babel will do name normalization)
{
    plugins: [
        ['macaroni', { importType: 'require' }]
    ]
}

You can also pass skipImport: true to not import anything when parsing with babel, if you plan to use this in a browser type setting or something, idunno. It was added for unit testing but I'm sure it has some use.

I recommend that macaroni runs before most other transformers, or it may produce unexpected behavior.

Keywords

FAQs

Package last updated on 04 Apr 2019

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