# babel-plugin-global-assignment

> A `babel-plugin` that translates global assignment statements into setting property statements for global objects.

Latest version **1.0.1** (published 2019-12-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-global-assignment
pnpm add babel-plugin-global-assignment
yarn add babel-plugin-global-assignment
bun add babel-plugin-global-assignment
```

## 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.1 |
| Published | 2019-12-27 |
| First published | 2019-11-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Forek |
| Maintainers | forek |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-global-assignment
- npm.io page: https://npm.io/package/babel-plugin-global-assignment

## Recent versions

- 1.0.1 (latest) — 2019-12-27
- 1.0.0 — 2019-11-13

## README

# babel-plugin-global-assignment
A `babel-plugin` that translates global assignment statements into setting property statements for global objects.

## Install
```
npm install --save-dev babel-plugin-global-assignment
```

## Usage
### Via `.babelrc`

```json
{
  "plugins": [
    [
      "babel-plugin-global-assignment", {
        "globalObject": "window"
      }
    ]
  ]
}
```

## Options
* globalObject: Specify global object name.

## Example

in
```javascript
foo = true
function () {
  bar = true
  let baz = false
  baz = true
}
```

out
```javascript
window.foo = true
function () {
  window.bar = true
  let baz = false
  baz = true
}
```

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