The code takes an ASCII string as input, parses it and returns a JSON object.
The lib folder contains multiple js files and the codes sub-folder again multiple js files in it. I have no idea how to set all this into the Function node.
I guess the On Message property could be something like this, but what about the rest of the code/files?
var nmea = require('nmea');
return nmea.parse(msg.payload);
Thank you so much @marcus-j-davies for your reply. It has definitely put me on the right track. TL;DR: search for "npm & node-red" or in the "node-red library".