News for hackers. Stuff that matters.
Re:jQuery 3.6.0 by rofrol on Tuesday March 02, 2021 @08:48PM (#26323712)
Nice,

  ['map', 'find', 'filter', 'reduce'].forEach(f => NodeList.prototype[f] = Array.prototype[f])
  // this is for for..of, cannot be above 'map', 'filter' etc.
  NodeList.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]
  document.querySelectorAll('span').map(el => console.log(el))
  document.querySelectorAll('span').filter(el => el.className === 'fc-black-500').reduce((acc, el) => (acc += el.className, acc), '')
  for(let p of document.querySelectorAll('p')) { console.log(p) }
- https://stackoverflow.com/questions/30836289/for-of-loop-que...
Re:jQuery 3.6.0 by megous on Friday March 05, 2021 @03:35PM (#26361725)
You can also create a getter on NodeList.prototype named '_' that returns Array.from(this) and then just use any of the array methods on it. Like

    document.querySelectorAll('div')._.some(...)
So many options. :)