Created
November 23, 2018 06:35
-
-
Save temberature/c081e8c0e91a2b7a3aaadb8ff088e7a3 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
var nodes = document.querySelectorAll('[is]') | |
Array.from(nodes).reduce((times, node) => { | |
var type = node.getAttribute('is') | |
if (!times[type]) { | |
times[type] = 1 | |
} else { | |
times[type] ++ | |
} | |
return times | |
}, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment