n8n/packages/nodes-base/nodes/Merge/v3/actions/mode/append.ts
कारतोफ्फेलस्क्रिप्ट™ 969439ce56
fix(core): Fix .map calls on NodeExecutionOutput (no-changelog) (#11955)
2024-12-02 16:55:01 +01:00

32 lines
747 B
TypeScript

import {
type IExecuteFunctions,
type INodeExecutionData,
type INodeProperties,
} from 'n8n-workflow';
import { numberInputsProperty } from '../../helpers/descriptions';
import { updateDisplayOptions } from '@utils/utilities';
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];
}