# RED.library.register usage

**URL:** <https://discourse.nodered.org/t/red-library-register-usage/1175>\
**Category:** Core Development\
**Created:** [29 June 2018 06:53 UTC](https://discourse.nodered.org/t/red-library-register-usage/1175 "2018-06-29T06:53:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [29 June 2018 06:53 UTC](https://discourse.nodered.org/t/red-library-register-usage/1175/1 "2018-06-29T06:53:34Z")

</div>

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](https://github.com/node-red/node-red/blob/master/nodes/core/core/80-function.js), this code snippet can be found:

```auto
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

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 June 2018 06:56 UTC](https://discourse.nodered.org/t/red-library-register-usage/1175/2 "2018-06-29T06:56:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [29 June 2018 07:05 UTC](https://discourse.nodered.org/t/red-library-register-usage/1175/3 "2018-06-29T07:05:19Z")

</div>

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