# @putout/plugin-remove-iife

> 🐊Putout plugin adds ability to find and remove iife

Latest version **5.1.0** (published 2025-11-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @putout/plugin-remove-iife
pnpm add @putout/plugin-remove-iife
yarn add @putout/plugin-remove-iife
bun add @putout/plugin-remove-iife
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 5.1.0 |
| Published | 2025-11-12 |
| First published | 2020-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 4.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 795 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | putout, putout-plugin, putout-plugin-remove, plugin, iife |

## Links

- npm: https://www.npmjs.com/package/@putout/plugin-remove-iife
- Repository: https://github.com/coderaiser/putout
- Homepage: https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-iife#readme
- Issues: https://github.com/coderaiser/putout/issues
- npm.io page: https://npm.io/package/@putout/plugin-remove-iife

## Recent versions

- 5.1.0 (latest) — 2025-11-12
- 5.0.0 — 2025-05-30
- 4.1.0 — 2023-04-23
- 4.0.0 — 2023-03-10
- 3.1.0 — 2023-01-19
- 3.0.0 — 2023-01-18
- 2.1.1 — 2022-09-14
- 2.1.0 — 2022-09-13
- 2.0.0 — 2022-09-12
- 1.1.0 — 2020-10-25
- 1.0.0 — 2020-10-24

## README

# @putout/plugin-remove-iife [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-iife.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-iife"npm"

> An **IIFE** (Immediately Invoked Function Expression) is a **JavaScript** function that runs as soon as it is defined.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Glossary/IIFE)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to find and remove **IIFE**.
Check out in 🐊**Putout Editor**:

- ✅ [getting read of `IIFE`](https://putout.cloudcmd.io/#/gist/e4c8fb3bdf6beb33b693a4ee0892d9aa/93296ca2fd22e502a584f95ce5c5e3a7ae838e2f) using **Linked Template Values**[(`__a`](https://github.com/coderaiser/putout/blob/master/docs/putout-script.md#__a));
- ✅ [getting read of `IIFE`](https://putout.cloudcmd.io/#/gist/42c19f103b40d86b1d20d7201306c5e3/c752dcc2d80fe90ca2431ad952a5fdc32a780492) using **Linked Args** [(`__args__a`)](https://github.com/coderaiser/putout/blob/master/docs/putout-script.md#__args__a);

## Install

```
npm i @putout/plugin-remove-iife
```

## Rule

```json
{
    "rules": {
        "remove-iife": "on"
    }
}
```

## ❌ Example of incorrect code

```js
(function() {
    console.log('hello');
})();

((a) => fn(a))(value);
((a, b) => fn(a, b))(value, value2);
```

## ✅ Example of correct code

```js
console.log('hello');
fn(value);
fn(value, value2);
```

## License

MIT

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