RED.library.register usage

#1

Hi folks,

I was wondering what RED.library.register is used for, and how we can use it when designing a custom node.

For example in the function node, this code snippet can be found:

RED.library.register("functions");

Does this mean that I can reuse the function node code somehow in my custom node. In my custom node I also have to run Javascript code in a secure sandbox, and I would like to avoid having to copy all the code. E.g. when the limited Node-Red API of the function node changes, it would be nice if I wouldn’t have to update my custom node …

Thanks !
Bart

0 Likes

#2

No, that creates a functions section under the library for the user to save functions in

0 Likes

#3

Ok, thanks Dave.
Then I will try to become a copy-paste developer :face_with_raised_eyebrow:

0 Likes