# @putout/plugin-split-nested-destructuring

> 🐊Putout plugin adds ability to split nested destructuring

Latest version **4.1.2** (published 2025-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @putout/plugin-split-nested-destructuring
pnpm add @putout/plugin-split-nested-destructuring
yarn add @putout/plugin-split-nested-destructuring
bun add @putout/plugin-split-nested-destructuring
```

## Health

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

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

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.1.2 |
| Published | 2025-11-29 |
| First published | 2020-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 796 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | putout, putout-plugin, plugin, debugger |

## Links

- npm: https://www.npmjs.com/package/@putout/plugin-split-nested-destructuring
- Repository: https://github.com/coderaiser/putout
- Homepage: https://github.com/coderaiser/putout/tree/v40.15.1/packages/plugin-split-nested-destructuring#readme
- Issues: https://github.com/coderaiser/putout/issues
- npm.io page: https://npm.io/package/@putout/plugin-split-nested-destructuring

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 4.1.2 (latest) — 2025-11-29
- 4.1.1 — 2025-11-29
- 4.1.0 — 2025-10-31
- 4.0.0 — 2025-05-01
- 3.0.0 — 2023-06-13
- 2.2.1 — 2023-03-03
- 2.2.0 — 2023-03-03
- 2.1.0 — 2023-02-21
- 2.0.0 — 2023-02-02
- 1.1.0 — 2021-03-24
- 1.0.1 — 2020-05-07
- 1.0.0 — 2020-05-07

## README

# @putout/plugin-split-nested-destructuring [![NPM version][NPMIMGURL]][NPMURL]

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

> - Don't use nested destructuring on data that comes from any external data sources (such as `REST API`s, `GraphQL` endpoints or files).
> - Don't use nested destructuring on function arguments that have long or complicated signatures.
>
> (c) [Destructuring in JavaScript: the not so good parts](https://goodguydaniel.com/blog/destructuring-not-so-good-parts)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to split nested destructuring. Merged with [`@putout/plugin-destructuring`](https://www.npmjs.com/package/@putout/plugin-destructuring).


## Install

```
npm i @putout/plugin-split-nested-destructuring -D
```

## Rule

```json
{
    "rules": {
        "split-nested-destructuring": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const {
    a: {
        b,
    },
    a: {
        b: x,
    },
} = c;

function f({a: {b}}) {
    console.log(b);
}
```

## ✅ Example of correct code

```js
const {a} = c;
const {b, b: x} = a;

function f({a}) {
    const {b} = a;
    console.log(b);
}
```

## License

MIT

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