Created
October 12, 2022 04:19
-
-
Save jonesnxt/b9f86d352e7723e0c5f0ca250bf9c51e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
S('JSXOpeningElement').each((openingTag) => { | |
const attributes = openingTag.children('JSXAttribute'); | |
const sortedAttributes = attributes | |
.map((attribute) => attribute.text()) | |
.sort(); | |
attributes.each((attribute, i) => attribute.text(sortedAttributes[i])); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment