This pandoc filter aeroreyna/pandoc-doi2bib (github.com) is written in javascript. Do I need to install nodejs to use this filter? Are there existing examples of R packages which install pandoc filters with javascript?
Pandoc filters seem to be written in many different programming languages. Once installed, can the user ignore the programming language of the pandoc filter?
I've used Lua filters and Python filters, but not JavaScript, as of yet. That being said, yes, I would think you need to have node.js installed for this. Pandoc has its own Lua interpreter which is why Lua works so seamlessly for filters, but for Python and JavaScript (and others), pandoc will treat the file as executable as will assume access to the appropriate interpreter via the PATH.
In particular, this section (Pandoc - Pandoc filters) lists the interpreters used for filters based on different file extensions. Node is the listed interpreter for JS files.