description:'Run this code only once, no matter how many input items there are',
},
{
name:'Run Once for Each Item',
value:'runOnceForEachItem',
description:'Run this code as many times as there are input items',
},
],
default:'runOnceForAllItems',
},
{
displayName:'JavaScript',
name:'jsCode',
typeOptions:{
editor:'codeNodeEditor',
},
type:'string',
default:'',// set by component
description:
'JavaScript code to execute.<br><br>Tip: You can use luxon vars like <code>$today</code> for dates and <code>$jmespath</code> for querying JSON structures. <a href="https://docs.n8n.io/nodes/n8n-nodes-base.function">Learn more</a>.',
noDataExpression: true,
},
{
displayName:
'Type <code>$</code> for a list of <a target="_blank" href="https://docs.n8n.io/code-examples/methods-variables-reference/">special vars/methods</a>. Debug by using <code>console.log()</code> statements and viewing their output in the browser console.',