# babel-plugin-macaroni

> Babel plugin for macaroni

Latest version **1.0.0** (published 2019-04-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-macaroni
pnpm add babel-plugin-macaroni
yarn add babel-plugin-macaroni
bun add babel-plugin-macaroni
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-04-04 |
| First published | 2019-04-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 40 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | spencer@frozor.io |
| Maintainers | arcticzeroo |
| Keywords | macaroni, babel, babel, plugin, operator, operator, overloading, overloading |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-macaroni
- Repository: https://github.com/arcticzeroo/babel-plugin-macaroni
- Homepage: https://github.com/arcticzeroo/babel-plugin-macaroni#readme
- Issues: https://github.com/arcticzeroo/babel-plugin-macaroni/issues
- npm.io page: https://npm.io/package/babel-plugin-macaroni

## Dependencies (4)

- [chai](https://npm.io/package/chai.md) ^4.2.0
- [babel-core](https://npm.io/package/babel-core.md) ^6.26.3
- [babel-types](https://npm.io/package/babel-types.md) ^6.26.0
- [babel-traverse](https://npm.io/package/babel-traverse.md) ^6.26.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-04-04

## README

# 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)


```typescript
{
    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.

---
_Source: https://npm.io/package/babel-plugin-macaroni · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
