1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge branch 'pr_2920'

This commit is contained in:
Nick O'Leary 2021-04-12 12:08:32 +01:00
commit 8227643741
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -52,10 +52,11 @@
pass <code>msg</code> as a second argument to <code>node.error</code>:</p> pass <code>msg</code> as a second argument to <code>node.error</code>:</p>
<pre>node.error("Error",msg);</pre> <pre>node.error("Error",msg);</pre>
<h4>Accessing Node Information</h4> <h4>Accessing Node Information</h4>
<p>In the function block, id and name of the node can be referenced using the following properties:</p> <p>The following properties are available to access information about the node:</p>
<ul> <ul>
<li><code>node.id</code> - id of the node</li> <li><code>node.id</code> - id of the node</li>
<li><code>node.name</code> - name of the node</li> <li><code>node.name</code> - name of the node</li>
<li><code>node.outputCount</code> - number of node outputs</li>
</ul> </ul>
<h4>Using environment variables</h4> <h4>Using environment variables</h4>
<p>Environment variables can be accessed using <code>env.get("MY_ENV_VAR")</code>.</p> <p>Environment variables can be accessed using <code>env.get("MY_ENV_VAR")</code>.</p>