mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Remove linting exceptions in nodes-base (no-changelog) (#4944)
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
import type { IDataObject } from 'n8n-workflow';
|
||||
|
||||
export function isObject(maybe: unknown): maybe is { [key: string]: unknown } {
|
||||
return typeof maybe === 'object' && maybe !== null && !Array.isArray(maybe);
|
||||
}
|
||||
|
||||
function isTraversable(maybe: unknown): maybe is IDataObject {
|
||||
return isObject(maybe) && typeof maybe.toJSON !== 'function' && Object.keys(maybe).length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Stringify any non-standard JS objects (e.g. `Date`, `RegExp`) inside output items at any depth.
|
||||
*/
|
||||
@@ -16,14 +24,6 @@ export function standardizeOutput(output: IDataObject) {
|
||||
return output;
|
||||
}
|
||||
|
||||
export function isObject(maybe: unknown): maybe is { [key: string]: unknown } {
|
||||
return typeof maybe === 'object' && maybe !== null && !Array.isArray(maybe);
|
||||
}
|
||||
|
||||
function isTraversable(maybe: unknown): maybe is IDataObject {
|
||||
return isObject(maybe) && typeof maybe.toJSON !== 'function' && Object.keys(maybe).length > 0;
|
||||
}
|
||||
|
||||
export type CodeNodeMode = 'runOnceForAllItems' | 'runOnceForEachItem';
|
||||
|
||||
export const REQUIRED_N8N_ITEM_KEYS = new Set(['json', 'binary', 'pairedItem']);
|
||||
|
||||
Reference in New Issue
Block a user