9.0.0 β’ Published 2 years ago
@putout/plugin-extract-object-properties v9.0.0
@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.
Install
npm i @putout/plugin-extract-object-properties -D
Rule
{
"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
9.0.0
2 years ago
8.3.1
2 years ago
8.3.0
3 years ago
8.1.0
3 years ago
8.0.1
3 years ago
8.0.0
3 years ago
8.2.0
3 years ago
7.0.0
3 years ago
6.0.1
4 years ago
6.0.0
4 years ago
5.0.0
4 years ago
4.0.0
4 years ago
3.2.3
4 years ago
3.2.2
4 years ago
3.2.1
4 years ago
3.2.0
5 years ago
3.1.3
5 years ago
3.1.2
5 years ago
3.1.1
5 years ago
3.1.0
5 years ago
3.0.0
5 years ago
2.0.0
5 years ago
1.3.0
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago