Socket
Book a DemoInstallSign in
Socket

@putout/plugin-merge-destructuring-properties

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@putout/plugin-merge-destructuring-properties

🐊Putout plugin adds ability to merge destructuring properties

latest
Source
npmnpm
Version
12.3.0
Version published
Weekly downloads
14K
-21.98%
Maintainers
1
Weekly downloads
 
Created
Source

@putout/plugin-merge-destructuring-properties NPM version

The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.

(c) MDN

🐊Putout plugin adds ability to merge destructuring properties. Checkout in 🐊Putout Editor.

Install

npm i @putout/plugin-merge-destructuring-properties

Rule

Rule merge-destructuring-properties is enabled by default, to disable add to .putout.json:

{
    "rules": {
        "merge-destructuring-properties": "off"
    }
}

❌ Example of incorrect code

const {one} = require('numbers');
const {two} = require('numbers');

✅ Example of correct code

const {one, two} = require('numbers');

Assignment

❌ Example of incorrect code

({from} = data);
({to} = data);
({names} = data);

✅ Example of correct code

({
    from,
    to,
    names,
} = data);

License

MIT

Keywords

putout

FAQs

Package last updated on 24 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts