@putout/printer 1.148.0 → 1.148.1
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
|
@@ -25,7 +25,15 @@ const {
|
|
|
25
25
|
|
|
26
26
|
const isForOf = ({parentPath}) => parentPath.isForOfStatement();
|
|
27
27
|
|
|
28
|
-
const isStringAndArray = ([a, b]) =>
|
|
28
|
+
const isStringAndArray = ([a, b]) => {
|
|
29
|
+
if (!isStringLiteral(a))
|
|
30
|
+
return false;
|
|
31
|
+
|
|
32
|
+
if (!isArrayExpression(b))
|
|
33
|
+
return false;
|
|
34
|
+
|
|
35
|
+
return !isStringAndIdentifier(b.node.elements);
|
|
36
|
+
};
|
|
29
37
|
const isStringAndString = ([a, b]) => isStringLiteral(a) && isStringLiteral(b);
|
|
30
38
|
const isIdentifierAndIdentifier = ([a, b]) => isIdentifier(a) && isIdentifier(b);
|
|
31
39
|
const isInsideArray = (path) => path.parentPath.isArrayExpression();
|
package/package.json
CHANGED