feat: rm spread op to reduce time complexity
This commit is contained in:
@@ -374,23 +374,17 @@ export class WorkflowInterpreter {
|
||||
scrapeSchemaOutput: Object.keys(mergedScrapeSchema).length > 0
|
||||
? { "schema_merged": [mergedScrapeSchema] }
|
||||
: this.serializableDataByType.scrapeSchema.reduce((reducedObject, item, index) => {
|
||||
return {
|
||||
[`schema_${index}`]: item,
|
||||
...reducedObject,
|
||||
}
|
||||
}, {}),
|
||||
reducedObject[`schema_${index}`] = item;
|
||||
return reducedObject;
|
||||
}, {} as Record<string, any>),
|
||||
scrapeListOutput: this.serializableDataByType.scrapeList.reduce((reducedObject, item, index) => {
|
||||
return {
|
||||
[`list_${index}`]: item,
|
||||
...reducedObject,
|
||||
}
|
||||
}, {}),
|
||||
reducedObject[`list_${index}`] = item;
|
||||
return reducedObject;
|
||||
}, {} as Record<string, any>),
|
||||
binaryOutput: this.binaryData.reduce((reducedObject, item, index) => {
|
||||
return {
|
||||
[`item_${index}`]: item,
|
||||
...reducedObject,
|
||||
}
|
||||
}, {})
|
||||
reducedObject[`item_${index}`] = item;
|
||||
return reducedObject;
|
||||
}, {} as Record<string, any>)
|
||||
}
|
||||
|
||||
logger.log('debug', `Interpretation finished`);
|
||||
|
||||
Reference in New Issue
Block a user