Files
n8n-nodes-gwezz-changdunovel/node_modules/n8n-workflow/dist/esm/tool-helpers.js
2025-10-26 23:10:15 +08:00

9 lines
384 B
JavaScript

/**
* Converts a node name to a valid tool name by replacing special characters with underscores
* and collapsing consecutive underscores into a single one.
*/
export function nodeNameToToolName(nodeOrName) {
const name = typeof nodeOrName === 'string' ? nodeOrName : nodeOrName.name;
return name.replace(/[^a-zA-Z0-9_-]+/g, '_');
}
//# sourceMappingURL=tool-helpers.js.map