Last active
June 27, 2019 01:41
-
-
Save markdon/1e95cababf7522b55ea31c7ba41b1af0 to your computer and use it in GitHub Desktop.
[Board Stats for Boards Websphere] This script will output the counts of each type of node in the currently open board. Internet Explorer does not support this code.
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
(()=>{ | |
const counts = {}; | |
Boards.current.boardNode.getAllDescendants().forEach((node)=>{ | |
const type = node.attributes.commonType; | |
if(!counts[type]) counts[type] = 1; | |
else counts[type]++; | |
}); | |
Object.keys(counts).forEach(key => console.log(`${key} ${counts[key]}`)); | |
return counts; | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment