Do something like:
NodeList.prototype.__proto__ = Array.prototype;
Re:You Might Not Need Underscore
by paulcpederson on Saturday July 11, 2015 @09:24PM
(#9872243)
var myClass = document.getElementsByClassName('myClass')
Array.prototype.slice.call(myClass).forEach(iteratee)
And all the other elements...
Yes, you are right. But... The "array" is not always an Array. document.getElementsByClassName( 'myClass' ) is not an Array but a DOMNodeList. So document.getElementsByClassName( 'myClass' ).forEach(iteratee) will not work. Same for map, reduce...
Underscore (or lodash) makes more that just polyfilling es5 methods.