['map', 'find'].forEach(f => NodeList.prototype[f] = Array.prototype[f]); document.querySelectorAll('bla').map(el => whatever)
['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) }
document.querySelectorAll('div')._.some(...)