@putout/printer 6.5.0 → 6.6.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,12 @@ const {
|
|
|
21
21
|
} = types;
|
|
22
22
|
|
|
23
23
|
const isNextObject = (a) => a.getNextSibling().isObjectExpression();
|
|
24
|
-
const isArrayInsideArray = (path) =>
|
|
24
|
+
const isArrayInsideArray = (path) => {
|
|
25
|
+
if (!path.isArrayExpression() || !path.parentPath.isArrayExpression())
|
|
26
|
+
return false;
|
|
27
|
+
|
|
28
|
+
return path === path.parentPath.get('elements').at(-1);
|
|
29
|
+
};
|
|
25
30
|
|
|
26
31
|
const isInsideOneElementArray = ({parentPath}) => parentPath.node.elements.length === 1;
|
|
27
32
|
const isInsideArray = (path) => path.parentPath.isArrayExpression();
|
package/package.json
CHANGED