@putout/bundle 4.6.0 → 4.6.2
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/README.md +0 -8
- package/bundle/putout.js +11 -0
- package/bundle/putout.min.js +1 -1
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -45,14 +45,6 @@ console.log(putout('compare(a, b)', {
|
|
|
45
45
|
});
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
## IIFE
|
|
49
|
-
|
|
50
|
-
When you want to access `putout` from global scope using `script` tag, use:
|
|
51
|
-
|
|
52
|
-
```html
|
|
53
|
-
<script src="https://cdn.jsdelivr.net/npm/@putout/bundle@3/bundle/putout-iife.js"></script>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
48
|
## License
|
|
57
49
|
|
|
58
50
|
MIT
|
package/bundle/putout.js
CHANGED
|
@@ -141701,6 +141701,17 @@ jsx.hasTagName = (path, name) => {
|
|
|
141701
141701
|
return node.openingElement.name.name === name;
|
|
141702
141702
|
};
|
|
141703
141703
|
|
|
141704
|
+
jsx.getAttributePath = (path, name) => {
|
|
141705
|
+
const attributes = path.get('openingElement.attributes');
|
|
141706
|
+
|
|
141707
|
+
for (const attr of attributes) {
|
|
141708
|
+
if (attr.node.name.name === name)
|
|
141709
|
+
return attr;
|
|
141710
|
+
}
|
|
141711
|
+
|
|
141712
|
+
return null;
|
|
141713
|
+
};
|
|
141714
|
+
|
|
141704
141715
|
/**
|
|
141705
141716
|
* The MIT License (MIT)
|
|
141706
141717
|
* Copyright (c) 2017-present Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
|