# Inheritance of custom nodes

**URL:** <https://discourse.nodered.org/t/inheritance-of-custom-nodes/47282>\
**Category:** Developing Nodes\
**Created:** [17 June 2021 08:23 UTC](https://discourse.nodered.org/t/inheritance-of-custom-nodes/47282 "2021-06-17T08:23:10Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [17 June 2021 10:37 UTC](https://discourse.nodered.org/t/inheritance-of-custom-nodes/47282/6 "2021-06-17T10:37:31Z")

</div>

Hi @H3llsing,  
I have recently put some of the shared logic of two of my nodes into npm package [nr-msg-statistics](https://www.npmjs.com/package/nr-msg-statistics?activeTab=dependencies). It is added as a dependency e.g. in my [node-red-contrib-msg-speed](https://www.npmjs.com/package/node-red-contrib-msg-speed) as a dependency, where I create a subclass.  
Perhaps not the best way to do it, but it now saves me a lot of work...  
Bart

---

_[View the full topic](https://discourse.nodered.org/t/inheritance-of-custom-nodes/47282)._
