Javascript to Function node. Lost, very lost... :/

I found this JS parser:

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);

Any hint is appreciated.

Hi @Tamadite,

If you're asking on how to use external modules in function nodes, please see my response here:


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".

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.