@putout/plugin-extract-object-properties
v10.0.1
Published
šPutout plugin adds ability to extract object properties into variable
Maintainers
Readme
@putout/plugin-extract-object-properties 
The destructuring assignment makes possible to unpack values from objects into distinct variables.
(c) MDN
šPutout plugin adds ability to apply destructuring to extract object properties. Merged with @putout/plugin-destructuring.
Install
npm i @putout/plugin-extract-object-properties -DRule
{
"rules": {
"extract-object-properties/equal-deep": "on",
"extract-object-properties/not-equal-deep": "on"
}
}Equal Deep
ā Example of incorrect code
const {replaceWith} = a.operate;
const {isIdentifier} = a.types;ā Example of correct code
const {operator, types} = a;
const {replaceWith} = operator;
const {isIdentifier} = types;Not Equal Deep
ā Example of incorrect code
const {replaceWith} = a;
const {isIdentifier} = a.types;ā Example of correct code
const {replaceWith, types} = a;
const {isIdentifier} = types;License
MIT
