@putout/printer 6.5.0 → 6.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog
CHANGED
|
@@ -21,7 +21,13 @@ const {
|
|
|
21
21
|
} = types;
|
|
22
22
|
|
|
23
23
|
const isNextObject = (a) => a.getNextSibling().isObjectExpression();
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
const isArrayInsideArray = (path) => {
|
|
26
|
+
if (!path.isArrayExpression() || !path.parentPath.isArrayExpression())
|
|
27
|
+
return false;
|
|
28
|
+
|
|
29
|
+
return path.parentPath.node.elements.length <= 3;
|
|
30
|
+
};
|
|
25
31
|
|
|
26
32
|
const isInsideOneElementArray = ({parentPath}) => parentPath.node.elements.length === 1;
|
|
27
33
|
const isInsideArray = (path) => path.parentPath.isArrayExpression();
|
|
@@ -132,3 +138,4 @@ module.exports.ArrayExpression = {
|
|
|
132
138
|
indent.inc();
|
|
133
139
|
},
|
|
134
140
|
};
|
|
141
|
+
|
package/package.json
CHANGED