Last active
September 17, 2020 09:48
-
-
Save davidsara/ea5e1e59f856d2f1b0ac53d05d48c3bf to your computer and use it in GitHub Desktop.
#jArchi - Delete all unused elements (not used in any View).
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
// Delete all unused elements (not used in any View). | |
// | |
// (c) 2019 David Sara | |
function deleteUnusedElements() { | |
$("element").each(function(element) { | |
if($(element).objectRefs().isEmpty()) { | |
element.delete(); | |
} | |
}); | |
} | |
deleteUnusedElements(); | |
console.log("Done."); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, very helpful.