feat(Merge Node): Overhaul, v3 (#9528)
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Shireen Missi <94372015+ShireenMissi@users.noreply.github.com>
This commit is contained in:
32
packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts
Normal file
32
packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import {
|
||||
type IExecuteFunctions,
|
||||
type INodeExecutionData,
|
||||
type INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { numberInputsProperty } from '../../helpers/descriptions';
|
||||
|
||||
export const properties: INodeProperties[] = [numberInputsProperty];
|
||||
|
||||
const displayOptions = {
|
||||
show: {
|
||||
mode: ['append'],
|
||||
},
|
||||
};
|
||||
|
||||
export const description = updateDisplayOptions(displayOptions, properties);
|
||||
|
||||
export async function execute(
|
||||
this: IExecuteFunctions,
|
||||
inputsData: INodeExecutionData[][],
|
||||
): Promise<INodeExecutionData[]> {
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
||||
for (let i = 0; i < inputsData.length; i++) {
|
||||
returnData.push.apply(returnData, inputsData[i]);
|
||||
}
|
||||
|
||||
return returnData;
|
||||
}
|
||||
Reference in New Issue
Block a user