@putout/bundle 4.6.1 → 4.6.3
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/bundle/putout.js +16 -0
- package/bundle/putout.min.js +1 -1
- package/package.json +2 -2
package/bundle/putout.js
CHANGED
|
@@ -141712,6 +141712,22 @@ jsx.getAttributePath = (path, name) => {
|
|
|
141712
141712
|
return null;
|
|
141713
141713
|
};
|
|
141714
141714
|
|
|
141715
|
+
jsx.getAttributeNode = (path, name) => {
|
|
141716
|
+
let result = null;
|
|
141717
|
+
|
|
141718
|
+
const node = path.node || path;
|
|
141719
|
+
const {attributes} = node.openingElement;
|
|
141720
|
+
|
|
141721
|
+
for (const attr of attributes) {
|
|
141722
|
+
if (attr.name.name === name) {
|
|
141723
|
+
result = attr;
|
|
141724
|
+
break;
|
|
141725
|
+
}
|
|
141726
|
+
}
|
|
141727
|
+
|
|
141728
|
+
return result;
|
|
141729
|
+
};
|
|
141730
|
+
|
|
141715
141731
|
/**
|
|
141716
141732
|
* The MIT License (MIT)
|
|
141717
141733
|
* Copyright (c) 2017-present Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
|