# babylon-options

> Simplified options for Babylon

Latest version **2.0.1** (published 2018-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install babylon-options
pnpm add babylon-options
yarn add babylon-options
bun add babylon-options
```

## 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 | 2.0.1 |
| Published | 2018-02-28 |
| First published | 2017-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | James Kyle |
| Maintainers | thejameskyle |

## Links

- npm: https://www.npmjs.com/package/babylon-options
- npm.io page: https://npm.io/package/babylon-options

## Recent versions

- 2.0.1 (latest) — 2018-02-28
- 2.0.0 — 2018-02-28
- 1.1.2 — 2017-05-25
- 1.1.1 — 2017-05-25
- 1.1.0 — 2017-05-17
- 1.0.1 — 2017-05-17
- 1.0.0 — 2017-05-17

## README

# babylon-options

> Simplified options for [Babylon](https://github.com/babel/babylon)

**Before:**

```js
babylon.parse(code, {
  sourceType: 'module',
  plugins: [
    'jsx',
    'flow',
    'doExpressions',
    'objectRestSpread',
    'decorators',
    'classProperties',
    'exportExtensions',
    'asyncGenerators',
    'functionBind',
    'functionSent',
    'dynamicImport',
  ],
});
```

**After:**

```js
import * as babylon from 'babylon';
import createBabylonOptions from 'babylon-options';

babylon.parse(code, createBabylonOptions({
  stage: 2,
  plugins: ['flow', 'jsx'],
}));
```

## Options

All Babylon options will be passed through, will some additions/modifications:

- `sourceType`: Defaults to "module"
- `stage`: Set plugins based on TC39 stages
- `plugins`: You can still specify plugins, other options will add to this list

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