Guest User

Untitled

a guest
Feb 25th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function listConditions() {
  2.  
  3. var used = []
  4. var counted = []
  5.  
  6. EQCSS.data.forEach(item => item.conditions.forEach(cond => used.push(cond.measure)))
  7.  
  8. counted = used.reduce((a, b) => a.set(b, a.get(b) + 1 || 1), new Map)
  9.  
  10. return console.dir(Array.from(counted).sort((a, b) => b[1] - a[1]))
  11.  
  12. }
  13.  
  14. listConditions()
Add Comment
Please, Sign In to add comment