Last active
March 2, 2021 10:58
-
-
Save gavinmcfarland/76446110f1482b570e93a7554de58a72 to your computer and use it in GitHub Desktop.
A helper to get list of page names in a Figma document
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
function getPageNames() { | |
var names: any = [] | |
var pages = figma.root.findAll((node) => { | |
if (node.type === "PAGE") { | |
names.push(node.name) | |
} | |
return (node.type === "PAGE") | |
}) | |
return names | |
} | |
print (getPageNames().join("\n")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment