mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(Execute Workflow Node): Run once for each item mode (#7289)
Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -3,6 +3,7 @@ import type {
|
||||
IDisplayOptions,
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
IPairedItemData,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { jsonParse } from 'n8n-workflow';
|
||||
@@ -291,3 +292,14 @@ export function flattenObject(data: IDataObject) {
|
||||
}
|
||||
return returnData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate Paired Item Data by length of input array
|
||||
*
|
||||
* @param {number} length
|
||||
*/
|
||||
export function generatePairedItemData(length: number): IPairedItemData[] {
|
||||
return Array.from({ length }, (_, item) => ({
|
||||
item,
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user