Convert document.querySelectorAll's NodeList into an array.
var queryAll = require('queryall');
// document.querySelectorAll('.foo');
queryAll('.foo').forEach(function (el) {
console.log(el);
});
// parent.querySelectorAll('.foo');
var parent = document.querySelector('.parent');
queryAll('.foo', parent).forEach(function (el) {
console.log(el);
});
With npm do
$ npm install queryall