Convert NodeList to Array.
npm install nodelistarrayConvert NodeList to Array.
import('nodelistarray');document.querySelectorAll('p').toArray();
`We can then use ES6 array functions:
`
document.querySelectorAll('p').toArray().map(...)
document.querySelectorAll('p').toArray().filter(...)
`Example 2
``const arr = nodelistArray(document.querySelectorAll('p'));