first commit
This commit is contained in:
16
node_modules/n8n-workflow/dist/esm/common/get-node-by-name.js
generated
vendored
Normal file
16
node_modules/n8n-workflow/dist/esm/common/get-node-by-name.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Returns the node with the given name if it exists else null
|
||||
*
|
||||
* @param {INodes} nodes Nodes to search in
|
||||
* @param {string} name Name of the node to return
|
||||
*/
|
||||
export function getNodeByName(nodes, name) {
|
||||
if (Array.isArray(nodes)) {
|
||||
return nodes.find((node) => node.name === name) || null;
|
||||
}
|
||||
if (nodes.hasOwnProperty(name)) {
|
||||
return nodes[name];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//# sourceMappingURL=get-node-by-name.js.map
|
||||
Reference in New Issue
Block a user