# Proper way to define & namespace functions in a node

**URL:** https://discourse.nodered.org/t/proper-way-to-define-namespace-functions-in-a-node/18871
**Category:** Developing Nodes
**Created:** [6 December 2019 16:23 UTC](https://discourse.nodered.org/t/proper-way-to-define-namespace-functions-in-a-node/18871 "2019-12-06T16:23:47Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![fahrvergnuugen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fahrvergnuugen/32/818_2.png) [@fahrvergnuugen](https://discourse.nodered.org/u/fahrvergnuugen)
#### Post date: [6 December 2019 18:45 UTC](https://discourse.nodered.org/t/proper-way-to-define-namespace-functions-in-a-node/18871/8 "2019-12-06T18:45:57Z")

</div>

> I can't remember what defines an entry in the pallet. Is it the .html file or the .js file or a combination of those and the package.json entry?

I'm just adding new properties to the node's registration. Those properties aren't used by NR to render the node, so the pallet shouldn't be affected. But those properties are accessible from any other node's HTML file by using the `getType` method, so it makes for a convenient place to define and namespace all of my functions.

---

_[View the full topic](https://discourse.nodered.org/t/proper-way-to-define-namespace-functions-in-a-node/18871)._
