Created
August 8, 2022 09:31
-
-
Save gotjoshua/ddb7645e559814fc84d6712223ca7d51 to your computer and use it in GitHub Desktop.
convert for of loop topline to use index
This file contains 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
"convert for of loop topline to use index" : { | |
"prefix": "fc", | |
"body": ["${TM_SELECTED_TEXT/(for \\(const )(.*) of (.*)\\) {/$1[idx, $2] of $3.entries()) {/}"], | |
"description": "to use this snippet, select the top line of your for loop, type fc on top of it, choose snippet" | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
reg ex for testing regexr.com/6re4q